entry: only notify properties we have

GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.
This commit is contained in:
Matthias Clasen 2019-05-01 04:41:28 +00:00
parent 6878c2bae0
commit b2a23a9a90

View File

@ -1234,10 +1234,13 @@ notify_cb (GObject *object,
gpointer data)
{
gpointer iface;
gpointer class;
/* The editable interface properties are already forwarded by the editable delegate setup */
iface = g_type_interface_peek (g_type_class_peek (G_OBJECT_TYPE (object)), gtk_editable_get_type ());
if (!g_object_interface_find_property (iface, pspec->name))
class = g_type_class_peek (GTK_TYPE_ENTRY);
if (!g_object_interface_find_property (iface, pspec->name) &&
g_object_class_find_property (class, pspec->name))
g_object_notify (data, pspec->name);
}