diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-01-28 18:52:49 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-01-28 18:52:49 +0000 |
commit | e2b730ac43a27e91217a0d5602eff948f29533f5 (patch) | |
tree | 415cc297ea4c01e4c6d889dd14c4b4cf43603b01 /gtk/gtkcombo.c | |
parent | 929c8ed53e821f3f48dafc2757cb6b7cdc16cd7c (diff) | |
download | gdk-pixbuf-e2b730ac43a27e91217a0d5602eff948f29533f5.tar.gz |
General property notification cleanup.
Diffstat (limited to 'gtk/gtkcombo.c')
-rw-r--r-- | gtk/gtkcombo.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index dcc711b72..ab6d29b41 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -875,12 +875,20 @@ void gtk_combo_set_value_in_list (GtkCombo * combo, gboolean val, gboolean ok_if_empty) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + ok_if_empty = ok_if_empty != FALSE; - combo->value_in_list = val; - combo->ok_if_empty = ok_if_empty; g_object_freeze_notify (G_OBJECT (combo)); + if (combo->value_in_list != val) + { + combo->value_in_list = val; g_object_notify (G_OBJECT (combo), "value_in_list"); + } + if (combo->ok_if_empty != ok_if_empty) + { + combo->ok_if_empty = ok_if_empty; g_object_notify (G_OBJECT (combo), "allow_empty"); + } g_object_thaw_notify (G_OBJECT (combo)); } @@ -888,31 +896,47 @@ void gtk_combo_set_case_sensitive (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->case_sensitive != val) + { combo->case_sensitive = val; g_object_notify (G_OBJECT (combo), "case_sensitive"); + } } void gtk_combo_set_use_arrows (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->use_arrows != val) + { combo->use_arrows = val; g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); + } } void gtk_combo_set_use_arrows_always (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->use_arrows_always != val) + { + g_object_freeze_notify (G_OBJECT (combo)); combo->use_arrows_always = val; + g_object_notify (G_OBJECT (combo), "enable_arrows_always"); + + if (combo->use_arrows != TRUE) + { combo->use_arrows = TRUE; - g_object_freeze_notify (G_OBJECT (combo)); g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); - g_object_notify (G_OBJECT (combo), "enable_arrows_always"); + } g_object_thaw_notify (G_OBJECT (combo)); + } } void |