summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilderparser.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-24 16:34:48 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-09-27 17:47:24 -0400
commitec624029089d0e9ffc4d1b759b15e0983fb87f1d (patch)
treea170e5d54d9967c2b072e2b1b54c202fd3631b86 /gtk/gtkbuilderparser.c
parentc8f29a689d0721cc9ffb485073c4f999c6585385 (diff)
downloadgtk+-ec624029089d0e9ffc4d1b759b15e0983fb87f1d.tar.gz
builder: Fix parsing of mixed declarationsfix-builder-parsing
The GtkBuilder parser constructs the object e.g. when handling a <binding> element. There may be more <property> elements after it, which we were just not applying. Fix that by always applying property when we see </object>. To do that, we need to track the applied status per property. Test included. Fixes: #4208
Diffstat (limited to 'gtk/gtkbuilderparser.c')
-rw-r--r--gtk/gtkbuilderparser.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index c5b4039781..f91523d598 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -470,9 +470,6 @@ builder_construct (ParserData *data,
g_assert (object_info != NULL);
- if (object_info->object && object_info->applied_properties)
- return object_info->object;
-
if (object_info->object == NULL)
{
object = _gtk_builder_construct (data->builder, object_info, error);
@@ -488,8 +485,6 @@ builder_construct (ParserData *data,
_gtk_builder_apply_properties (data->builder, object_info, error);
}
- object_info->applied_properties = TRUE;
-
g_assert (G_IS_OBJECT (object));
object_info->object = object;