GtkCellRendererCombo: Use G_PARAM_EXPLICIT_NOTIFY

And add explicit notification for some properties.
This commit is contained in:
Matthias Clasen 2014-06-08 11:26:04 -04:00
parent da4a1e1594
commit af4d142df5

View File

@ -153,7 +153,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
-1, -1,
G_MAXINT, G_MAXINT,
-1, -1,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/** /**
* GtkCellRendererCombo:has-entry: * GtkCellRendererCombo:has-entry:
@ -169,7 +169,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
P_("Has Entry"), P_("Has Entry"),
P_("If FALSE, don't allow to enter strings other than the chosen ones"), P_("If FALSE, don't allow to enter strings other than the chosen ones"),
TRUE, TRUE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/** /**
@ -303,10 +303,18 @@ gtk_cell_renderer_combo_set_property (GObject *object,
break; break;
} }
case PROP_TEXT_COLUMN: 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; break;
case PROP_HAS_ENTRY: 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; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);