[gtk/entry-fix] entry: only notify properties we have
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/entry-fix] entry: only notify properties we have
- Date: Wed, 1 May 2019 04:43:09 +0000 (UTC)
commit b2a23a9a90581bf92f3d56df1116a1b050758658
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 1 04:41:28 2019 +0000
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.
gtk/gtkentry.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 04d955cea0..9015c1fb66 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]