[network-manager-netbook/MplPanelClient: 31/44] print GtkBuilder errors on UI construction
- From: Tambet Ingo <tambeti src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-netbook/MplPanelClient: 31/44] print GtkBuilder errors on UI construction
- Date: Tue, 10 Nov 2009 14:12:19 +0000 (UTC)
commit 02211b09401f920e64040f6b671694e2b483aa38
Author: Dan Williams <dcbw redhat com>
Date: Tue Sep 29 17:11:05 2009 -0700
print GtkBuilder errors on UI construction
src/nmn-applet.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/nmn-applet.c b/src/nmn-applet.c
index 2ec4722..d305d45 100644
--- a/src/nmn-applet.c
+++ b/src/nmn-applet.c
@@ -374,6 +374,7 @@ nmn_applet_init (NmnApplet *applet)
NmnAppletPrivate *priv = GET_PRIVATE (applet);
DBusGConnection *bus;
GtkWidget *container;
+ GError *error = NULL;
bus = init_dbus ();
/* FIXME: Do something nicer here */
@@ -391,8 +392,13 @@ nmn_applet_init (NmnApplet *applet)
nmn_status_icon_set_nm_client (priv->status_icon, NM_CLIENT (priv->nm_data));
priv->builder = gtk_builder_new ();
- gtk_builder_add_from_file (priv->builder, UIDIR "/network-manager-netbook.ui", NULL);
-
+ if (!gtk_builder_add_from_file (priv->builder, UIDIR "/network-manager-netbook.ui", &error)) {
+ g_warning ("%s: could not find UI resources: (%d) %s",
+ __func__,
+ error ? error->code : -1,
+ error && error->message ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
priv->pane = GTK_WIDGET (gtk_builder_get_object (priv->builder, "main_container"));
g_object_ref (priv->pane);
gtk_widget_unparent (priv->pane);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]