[seahorse/gnome-3-14] Don't hide GtkBuilder errors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/gnome-3-14] Don't hide GtkBuilder errors
- Date: Fri, 14 Nov 2014 20:23:26 +0000 (UTC)
commit d51b3db2211e806891384798c0c028502bb2b50b
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 14 04:37:10 2014 -0500
Don't hide GtkBuilder errors
This makes it unnecessarily hard to track down invalid
ui files.
https://bugzilla.gnome.org/show_bug.cgi?id=740138
libseahorse/seahorse-widget.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libseahorse/seahorse-widget.c b/libseahorse/seahorse-widget.c
index 963dfd2..49284e4 100644
--- a/libseahorse/seahorse-widget.c
+++ b/libseahorse/seahorse-widget.c
@@ -259,6 +259,7 @@ object_set_property (GObject *object, guint prop_id, const GValue *value, GParam
SeahorseWidget *swidget;
GtkWidget *w;
char *path;
+ GError *error = NULL;
swidget = SEAHORSE_WIDGET (object);
@@ -270,7 +271,12 @@ object_set_property (GObject *object, guint prop_id, const GValue *value, GParam
path = g_strdup_printf ("%sseahorse-%s.xml",
SEAHORSE_UIDIR, swidget->name);
swidget->gtkbuilder = gtk_builder_new ();
- gtk_builder_add_from_file (swidget->gtkbuilder, path, NULL);
+ gtk_builder_add_from_file (swidget->gtkbuilder, path, &error);
+ if (error)
+ {
+ g_warning ("Error parsing %s: %s\n", path, error->message);
+ g_error_free (error);
+ }
g_free (path);
g_return_if_fail (swidget->gtkbuilder != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]