[gnome-settings-daemon] keyboard: Fix error path usage
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] keyboard: Fix error path usage
- Date: Thu, 20 Oct 2011 16:00:31 +0000 (UTC)
commit 28ad7e334ee522a273129a414a454cc53246d32c
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 20 16:27:32 2011 +0100
keyboard: Fix error path usage
plugins/keyboard/gsd-keyboard-xkb.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
index f85ffba..7ee8555 100644
--- a/plugins/keyboard/gsd-keyboard-xkb.c
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
@@ -146,19 +146,18 @@ popup_menu_launch_capplet ()
gdk_display_get_app_launch_context
(gdk_display_get_default ());
- g_app_info_launch (info, NULL,
- G_APP_LAUNCH_CONTEXT (ctx), &error);
+ if (g_app_info_launch (info, NULL,
+ G_APP_LAUNCH_CONTEXT (ctx), &error) == FALSE) {
+ g_warning
+ ("Could not execute keyboard properties capplet: [%s]\n",
+ error->message);
+ g_error_free (error);
+ }
g_object_unref (info);
g_object_unref (ctx);
}
- if (error != NULL) {
- g_warning
- ("Could not execute keyboard properties capplet: [%s]\n",
- error->message);
- g_error_free (error);
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]