[gnome-control-center] info: Check for GtkBuilder error properly



commit 39a7520db1d203962de1fcd05375ed817bad584b
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Oct 15 15:59:55 2012 +0200

    info: Check for GtkBuilder error properly

 panels/info/cc-info-panel.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 41e8df7..1b34294 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -2002,11 +2002,9 @@ cc_info_panel_init (CcInfoPanel *self)
         }
     }
 
-  gtk_builder_add_from_file (self->priv->builder,
-                             GNOMECC_UI_DIR "/info.ui",
-                             &error);
-
-  if (error != NULL)
+  if (gtk_builder_add_from_file (self->priv->builder,
+                                 GNOMECC_UI_DIR "/info.ui",
+                                 &error) == 0)
     {
       g_warning ("Could not load interface file: %s", error->message);
       g_error_free (error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]