summaryrefslogtreecommitdiff
path: root/gtk/gtksearchentry.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-03-16 20:57:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-03-16 21:23:28 -0400
commita1cc809c6098a4526f8f9197beff39ede3d1e940 (patch)
tree4cd34663948c2347c513463670c04c3a845fb00f /gtk/gtksearchentry.c
parent7c19ab66ee236c546db96caf1d349194e076d2db (diff)
downloadgtk+-a1cc809c6098a4526f8f9197beff39ede3d1e940.tar.gz
search entry: Fix property notification
Both placeholder-text and activates-default were not up to our usual standards for property notification, and the tests complained.
Diffstat (limited to 'gtk/gtksearchentry.c')
-rw-r--r--gtk/gtksearchentry.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index fd6dfed05f..45ace300e7 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -172,7 +172,11 @@ gtk_search_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;
default:
@@ -294,7 +298,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *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",