diff options
author | Benjamin Otte <otte@redhat.com> | 2019-11-22 08:06:35 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2019-11-22 17:42:31 +0100 |
commit | 420169d5cd57fd16f71a0a9a7be7fb0a192e185d (patch) | |
tree | f2227d87f3f8481474522b9d3d40079d7e8dd86a /gtk/gtkbuilderparser.c | |
parent | b025ee428cd5f4f56c78c6bca5a04bd065e9936a (diff) | |
download | gtk+-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.c | 4 |
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; |