diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-03-17 18:44:36 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-03-17 18:46:18 -0400 |
commit | 26f99bf20c92b3689fa6235f2aea6f57871fa525 (patch) | |
tree | fb0d339650504acb0364402071642f27486d4985 /gtk | |
parent | 688f0997f4ef7f9fd40392634a678892e8ffb611 (diff) | |
download | gtk+-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.c | 10 |
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; |