[gnome-control-center/wip/region-panel: 43/43] Check gtk_builder_add_from_resource() return value
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/region-panel: 43/43] Check gtk_builder_add_from_resource() return value
- Date: Sun, 17 Feb 2013 00:33:35 +0000 (UTC)
commit 3a74ec96a0ebf826c419c0b0a1ab18e41e972c45
Author: Rui Matos <tiagomatos gmail com>
Date: Sun Feb 17 00:44:14 2013 +0100
Check gtk_builder_add_from_resource() return value
panels/common/cc-language-chooser.c | 3 +--
panels/region/cc-format-chooser.c | 3 +--
panels/region/cc-input-chooser.c | 3 +--
panels/region/cc-input-options.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 8520c28..59efd0b 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -411,8 +411,7 @@ cc_language_chooser_new (GtkWidget *parent)
g_resources_register (cc_common_get_resource ());
builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/control-center/common/language-chooser.ui",
&error);
- if (error) {
+ if (gtk_builder_add_from_resource (builder, "/org/gnome/control-center/common/language-chooser.ui",
&error) == 0) {
g_object_unref (builder);
g_warning ("failed to load language chooser: %s", error->message);
g_error_free (error);
diff --git a/panels/region/cc-format-chooser.c b/panels/region/cc-format-chooser.c
index e09cf23..a52bf0f 100644
--- a/panels/region/cc-format-chooser.c
+++ b/panels/region/cc-format-chooser.c
@@ -498,8 +498,7 @@ cc_format_chooser_new (GtkWidget *parent)
GError *error = NULL;
builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/format-chooser.ui",
&error);
- if (error) {
+ if (gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/format-chooser.ui",
&error) == 0) {
g_object_unref (builder);
g_warning ("failed to load format chooser: %s", error->message);
g_error_free (error);
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index 20000df..70af7a4 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -1043,8 +1043,7 @@ cc_input_chooser_new (GtkWindow *main_window,
GError *error = NULL;
builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/input-chooser.ui", &error);
- if (error)
+ if (gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/input-chooser.ui", &error)
== 0)
{
g_object_unref (builder);
g_warning ("failed to load input chooser: %s", error->message);
diff --git a/panels/region/cc-input-options.c b/panels/region/cc-input-options.c
index b09d968..52ed6f8 100644
--- a/panels/region/cc-input-options.c
+++ b/panels/region/cc-input-options.c
@@ -162,8 +162,7 @@ cc_input_options_new (GtkWidget *parent)
GError *error = NULL;
builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/input-options.ui", &error);
- if (error) {
+ if (gtk_builder_add_from_resource (builder, "/org/gnome/control-center/region/input-options.ui",
&error) == 0) {
g_object_unref (builder);
g_warning ("failed to load input options: %s", error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]