mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 09:40:19 +00:00
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.
This commit is contained in:
parent
7c19ab66ee
commit
a1cc809c60
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user