diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-03-16 21:03:52 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-03-16 21:23:28 -0400 |
commit | 64b9114d98cf9bf985e93b71e0f4ed8f67547be7 (patch) | |
tree | 9540c52d94e5cf8db6b16fb67e85acda36b9cdb2 | |
parent | a1cc809c6098a4526f8f9197beff39ede3d1e940 (diff) | |
download | gtk+-64b9114d98cf9bf985e93b71e0f4ed8f67547be7.tar.gz |
password entry: Fix property notification
Both placeholder-text and activates-default were not
up to our usual standards for property notification,
and the tests complained.
-rw-r--r-- | gtk/gtkpasswordentry.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c index ef6f1d815b..7a4019115a 100644 --- a/gtk/gtkpasswordentry.c +++ b/gtk/gtkpasswordentry.c @@ -230,7 +230,12 @@ gtk_password_entry_set_property (GObject *object, break; case PROP_ACTIVATES_DEFAULT: - gtk_text_set_activates_default (GTK_TEXT (priv->entry), g_value_get_boolean (value)); + if (gtk_text_get_activates_default (GTK_TEXT (priv->entry)) != g_value_get_boolean (value)) + { + gtk_text_set_activates_default (GTK_TEXT (priv->entry), g_value_get_boolean (value)); + g_object_notify_by_pspec (object, pspec); + } + break; case PROP_SHOW_PEEK_ICON: gtk_password_entry_set_show_peek_icon (entry, g_value_get_boolean (value)); @@ -359,7 +364,7 @@ gtk_password_entry_class_init (GtkPasswordEntryClass *klass) P_("Placeholder text"), P_("Show text in the entry when it’s empty and unfocused"), NULL, - GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY); + GTK_PARAM_READWRITE); props[PROP_ACTIVATES_DEFAULT] = g_param_spec_boolean ("activates-default", |