summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-03-17 18:44:36 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-03-17 18:46:18 -0400
commit26f99bf20c92b3689fa6235f2aea6f57871fa525 (patch)
treefb0d339650504acb0364402071642f27486d4985 /gtk
parent688f0997f4ef7f9fd40392634a678892e8ffb611 (diff)
downloadgtk+-26f99bf20c92b3689fa6235f2aea6f57871fa525.tar.gz
editable: Fix a thinko
When dealing with subclasses of GtkEntry, we were not getting the property offset that is stored on the GtkEntry type. This was showing up as criticals when trying to set ::width-chars on a GtkFileChooserEntry.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkeditable.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c
index f710d51cc0..9569c4bc20 100644
--- a/gtk/gtkeditable.c
+++ b/gtk/gtkeditable.c
@@ -935,7 +935,10 @@ gtk_editable_delegate_set_property (GObject *object,
GType type = G_TYPE_FROM_INSTANCE (object);
guint first_prop;
- first_prop = GPOINTER_TO_UINT (g_type_get_qdata (type, quark_editable_data));
+ do {
+ first_prop = GPOINTER_TO_UINT (g_type_get_qdata (type, quark_editable_data));
+ type = g_type_parent (type);
+ } while (first_prop == 0 && type != 0);
if (prop_id < first_prop)
return FALSE;
@@ -994,7 +997,10 @@ gtk_editable_delegate_get_property (GObject *object,
GType type = G_TYPE_FROM_INSTANCE (object);
guint first_prop;
- first_prop = GPOINTER_TO_UINT (g_type_get_qdata (type, quark_editable_data));
+ do {
+ first_prop = GPOINTER_TO_UINT (g_type_get_qdata (type, quark_editable_data));
+ type = g_type_parent (type);
+ } while (first_prop == 0 && type != 0);
if (prop_id < first_prop)
return FALSE;