diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2011-03-31 20:52:11 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2011-03-31 20:52:11 -0300 |
commit | 6846485c0d39f6c7791a78179b0f893c8a3cdd2a (patch) | |
tree | 44262da5cdb5434cacb24f18ec4f6d9ba8cefcf1 /gladeui/glade-cell-renderer-icon.c | |
parent | fd2be3bd491010fc9c05fd3fdf07fc03b0c7eeb8 (diff) | |
download | glade-6846485c0d39f6c7791a78179b0f893c8a3cdd2a.tar.gz |
* gladeui/glade-base-editor.c,
gladeui/glade-cell-renderer-icon.c,
gladeui/glade-clipboard.c,
gladeui/glade-editor.c,
gladeui/glade-inspector.c,
gladeui/glade-palette.c,
gladeui/glade-project.c,
gladeui/glade-property.c,
gladeui/glade-signal.c,
gladeui/glade-widget-action.c,
gladeui/glade-widget.c:
Replaced g_object_notify() with g_object_notify_by_spec()
Diffstat (limited to 'gladeui/glade-cell-renderer-icon.c')
-rw-r--r-- | gladeui/glade-cell-renderer-icon.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/gladeui/glade-cell-renderer-icon.c b/gladeui/glade-cell-renderer-icon.c index 69947457..6ba93bbf 100644 --- a/gladeui/glade-cell-renderer-icon.c +++ b/gladeui/glade-cell-renderer-icon.c @@ -58,8 +58,10 @@ enum PROP_0, PROP_ACTIVATABLE, PROP_ACTIVE, + N_PROPERTIES }; +static GParamSpec *properties[N_PROPERTIES]; static guint icon_cell_signals[LAST_SIGNAL] = { 0 }; @@ -91,22 +93,21 @@ glade_cell_renderer_icon_class_init (GladeCellRendererIconClass * class) cell_class->activate = glade_cell_renderer_icon_activate; - g_object_class_install_property (object_class, - PROP_ACTIVE, - g_param_spec_boolean ("active", "Icon state", - "The icon state of the button", - FALSE, - G_PARAM_READABLE | - G_PARAM_WRITABLE)); - - g_object_class_install_property (object_class, - PROP_ACTIVATABLE, - g_param_spec_boolean ("activatable", - "Activatable", - "The icon button can be activated", - TRUE, - G_PARAM_READABLE | - G_PARAM_WRITABLE)); + properties[PROP_ACTIVE] = + g_param_spec_boolean ("active", "Icon state", + "The icon state of the button", + FALSE, + G_PARAM_READABLE | G_PARAM_WRITABLE); + + properties[PROP_ACTIVATABLE] = + g_param_spec_boolean ("activatable", + "Activatable", + "The icon button can be activated", + TRUE, + G_PARAM_READABLE | G_PARAM_WRITABLE); + + /* Install all properties */ + g_object_class_install_properties (object_class, N_PROPERTIES, properties); icon_cell_signals[ACTIVATE] = g_signal_new ("activate", @@ -206,7 +207,7 @@ glade_cell_renderer_icon_set_active (GladeCellRendererIcon * icon, if (icon->priv->active != setting) { icon->priv->active = setting ? TRUE : FALSE; - g_object_notify (G_OBJECT (icon), "active"); + g_object_notify_by_pspec (G_OBJECT (icon), properties[PROP_ACTIVE]); } } @@ -227,6 +228,6 @@ glade_cell_renderer_icon_set_activatable (GladeCellRendererIcon * icon, if (icon->priv->activatable != setting) { icon->priv->activatable = setting ? TRUE : FALSE; - g_object_notify (G_OBJECT (icon), "activatable"); + g_object_notify_by_pspec (G_OBJECT (icon), properties[PROP_ACTIVATABLE]); } } |