[clutter/wip/clutter-1.99: 23/57] 2.0: Remove deprecated API from ClutterText
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/clutter-1.99: 23/57] 2.0: Remove deprecated API from ClutterText
- Date: Fri, 5 Apr 2013 17:49:55 +0000 (UTC)
commit 270ceebf8de324860fdd0fe546edb9f79b39d034
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Aug 24 10:43:29 2012 +0100
2.0: Remove deprecated API from ClutterText
clutter/clutter-text.c | 65 +-----------------------------------------------
clutter/clutter-text.h | 3 --
2 files changed, 1 insertions(+), 67 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index e0901cd..5e9c99e 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 fd6e193..4a23e7f 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 >*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]