summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderercombo.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-08 11:26:04 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-09 13:30:56 -0400
commitaf4d142df5b54a7f3a22995ae657f089b54c7591 (patch)
tree5f67673ceca69445a015f1ae956024a3c26761bb /gtk/gtkcellrenderercombo.c
parentda4a1e1594123ee18ca19d894616d4c02f6409c9 (diff)
downloadgtk+-af4d142df5b54a7f3a22995ae657f089b54c7591.tar.gz
GtkCellRendererCombo: Use G_PARAM_EXPLICIT_NOTIFY
And add explicit notification for some properties.
Diffstat (limited to 'gtk/gtkcellrenderercombo.c')
-rw-r--r--gtk/gtkcellrenderercombo.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c
index 89ed2cf488..78eb81bdad 100644
--- a/gtk/gtkcellrenderercombo.c
+++ b/gtk/gtkcellrenderercombo.c
@@ -153,7 +153,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
-1,
G_MAXINT,
-1,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererCombo:has-entry:
@@ -169,7 +169,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
P_("Has Entry"),
P_("If FALSE, don't allow to enter strings other than the chosen ones"),
TRUE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -303,10 +303,18 @@ gtk_cell_renderer_combo_set_property (GObject *object,
break;
}
case PROP_TEXT_COLUMN:
- priv->text_column = g_value_get_int (value);
+ if (priv->text_column != g_value_get_int (value))
+ {
+ priv->text_column = g_value_get_int (value);
+ g_object_notify_by_pspec (object, pspec);
+ }
break;
case PROP_HAS_ENTRY:
- priv->has_entry = g_value_get_boolean (value);
+ if (priv->has_entry != g_value_get_boolean (value))
+ {
+ priv->has_entry = g_value_get_boolean (value);
+ g_object_notify_by_pspec (object, pspec);
+ }
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);