summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilderparser.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-11-22 08:06:35 +0100
committerBenjamin Otte <otte@redhat.com>2019-11-22 17:42:31 +0100
commit420169d5cd57fd16f71a0a9a7be7fb0a192e185d (patch)
treef2227d87f3f8481474522b9d3d40079d7e8dd86a /gtk/gtkbuilderparser.c
parentb025ee428cd5f4f56c78c6bca5a04bd065e9936a (diff)
downloadgtk+-420169d5cd57fd16f71a0a9a7be7fb0a192e185d.tar.gz
builder: Improve signal connecting
- Propagate the error back to the parser, so we get a proper GError instead of a g_warning(). - Connect closures by id, don't construct a name from the ids so that glib can take it apart again.
Diffstat (limited to 'gtk/gtkbuilderparser.c')
-rw-r--r--gtk/gtkbuilderparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index 954a06b772..a853151806 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -1594,7 +1594,9 @@ _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
if (!gtk_buildable_parse_context_parse (&data.ctx, buffer, length, error))
goto out;
- _gtk_builder_finish (builder);
+ if (!_gtk_builder_finish (builder, error))
+ goto out;
+
if (_gtk_builder_lookup_failed (builder, error))
goto out;