summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2012-08-24 10:43:29 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2013-04-05 18:48:01 +0100
commit270ceebf8de324860fdd0fe546edb9f79b39d034 (patch)
tree4b5b033c552ba6fee539778ce01beb7860b890af
parentb3dfa71ca51a7387d638fcf81d7a563e651e3f23 (diff)
downloadclutter-270ceebf8de324860fdd0fe546edb9f79b39d034.tar.gz
2.0: Remove deprecated API from ClutterText
-rw-r--r--clutter/clutter-text.c65
-rw-r--r--clutter/clutter-text.h3
2 files changed, 1 insertions, 67 deletions
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index e0901cd31..5e9c99e0b 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -239,7 +239,6 @@ enum
PROP_LINE_WRAP_MODE,
PROP_JUSTIFY,
PROP_ELLIPSIZE,
- PROP_POSITION, /* XXX:2.0 - remove */
PROP_SELECTION_BOUND,
PROP_SELECTION_COLOR,
PROP_SELECTION_COLOR_SET,
@@ -265,7 +264,6 @@ static GParamSpec *obj_props[PROP_LAST];
enum
{
TEXT_CHANGED,
- CURSOR_EVENT, /* XXX:2.0 - remove */
ACTIVATE,
INSERT_TEXT,
DELETE_TEXT,
@@ -1009,17 +1007,8 @@ clutter_text_ensure_cursor_position (ClutterText *self)
if (!clutter_rect_equals (&priv->cursor_rect, &cursor_rect))
{
- ClutterGeometry cursor_pos;
-
priv->cursor_rect = cursor_rect;
- /* XXX:2.0 - remove */
- cursor_pos.x = clutter_rect_get_x (&priv->cursor_rect);
- cursor_pos.y = clutter_rect_get_y (&priv->cursor_rect);
- cursor_pos.width = clutter_rect_get_width (&priv->cursor_rect);
- cursor_pos.height = clutter_rect_get_height (&priv->cursor_rect);
- g_signal_emit (self, text_signals[CURSOR_EVENT], 0, &cursor_pos);
-
g_signal_emit (self, text_signals[CURSOR_CHANGED], 0);
}
}
@@ -1077,11 +1066,7 @@ clutter_text_delete_selection (ClutterText *self)
/* Not required to be guarded by g_object_freeze/thaw_notify */
if (priv->position != old_position)
- {
- /* XXX:2.0 - remove */
- g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_POSITION]);
- g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CURSOR_POSITION]);
- }
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CURSOR_POSITION]);
if (priv->selection_bound != old_selection)
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_SELECTION_BOUND]);
@@ -1224,7 +1209,6 @@ clutter_text_set_property (GObject *gobject,
clutter_text_set_ellipsize (self, g_value_get_enum (value));
break;
- case PROP_POSITION: /* XXX:2.0: remove */
case PROP_CURSOR_POSITION:
clutter_text_set_cursor_position (self, g_value_get_int (value));
break;
@@ -1333,7 +1317,6 @@ clutter_text_get_property (GObject *gobject,
g_value_set_int (value, priv->cursor_size);
break;
- case PROP_POSITION: /* XXX:2.0 - remove */
case PROP_CURSOR_POSITION:
g_value_set_int (value, priv->position);
break;
@@ -3540,26 +3523,6 @@ clutter_text_class_init (ClutterTextClass *klass)
g_object_class_install_property (gobject_class, PROP_CURSOR_SIZE, pspec);
/**
- * ClutterText:position:
- *
- * The current input cursor position. -1 is taken to be the end of the text
- *
- * Since: 1.0
- *
- * Deprecated: 1.12: Use ClutterText:cursor-position instead.
- */
- pspec = g_param_spec_int ("position",
- P_("Cursor Position"),
- P_("The cursor position"),
- -1, G_MAXINT,
- -1,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS |
- G_PARAM_DEPRECATED);
- obj_props[PROP_POSITION] = pspec;
- g_object_class_install_property (gobject_class, PROP_POSITION, pspec);
-
- /**
* ClutterText:cursor-position:
*
* The current input cursor position. -1 is taken to be the end of the text
@@ -3898,30 +3861,6 @@ clutter_text_class_init (ClutterTextClass *klass)
G_TYPE_INT);
/**
- * ClutterText::cursor-event:
- * @self: the #ClutterText that emitted the signal
- * @geometry: the coordinates of the cursor
- *
- * The ::cursor-event signal is emitted whenever the cursor position
- * changes inside a #ClutterText actor. Inside @geometry it is stored
- * the current position and size of the cursor, relative to the actor
- * itself.
- *
- * Since: 1.0
- *
- * Deprecated: 1.16: Use the #ClutterText::cursor-changed signal instead
- */
- text_signals[CURSOR_EVENT] =
- g_signal_new (I_("cursor-event"),
- G_TYPE_FROM_CLASS (gobject_class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
- G_STRUCT_OFFSET (ClutterTextClass, cursor_event),
- NULL, NULL,
- _clutter_marshal_VOID__BOXED,
- G_TYPE_NONE, 1,
- CLUTTER_TYPE_GEOMETRY | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- /**
* ClutterText::cursor-changed:
* @self: the #ClutterText that emitted the signal
*
@@ -5713,8 +5652,6 @@ clutter_text_set_cursor_position (ClutterText *self,
clutter_text_queue_redraw (CLUTTER_ACTOR (self));
- /* XXX:2.0 - remove */
- g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_POSITION]);
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CURSOR_POSITION]);
}
diff --git a/clutter/clutter-text.h b/clutter/clutter-text.h
index fd6e193de..4a23e7f49 100644
--- a/clutter/clutter-text.h
+++ b/clutter/clutter-text.h
@@ -65,7 +65,6 @@ struct _ClutterText
* ClutterTextClass:
* @text_changed: class handler for the #ClutterText::text-changed signal
* @activate: class handler for the #ClutterText::activate signal
- * @cursor_event: class handler for the #ClutterText::cursor-event signal
* @cursor_changed: class handler for the #ClutterText::cursor-changed signal
*
* The #ClutterTextClass struct contains only private data.
@@ -81,8 +80,6 @@ struct _ClutterTextClass
/* signals, not vfuncs */
void (* text_changed) (ClutterText *self);
void (* activate) (ClutterText *self);
- void (* cursor_event) (ClutterText *self,
- const ClutterGeometry *geometry);
void (* cursor_changed) (ClutterText *self);
/*< private >*/