diff options
author | Denis Gorodnichev <[email protected]> | 2014-02-17 09:19:25 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-02-17 09:19:25 +0100 |
commit | b60e3bd911695f8dfa5f1e782ee2ff50c4483baa (patch) | |
tree | e302ef76c4c241e7e012dc7e53861120c97277d7 | |
parent | eb9ce881f02a121bafcd47d4c0ad370bf8107b6b (diff) | |
download | mate-desktop-b60e3bd911695f8dfa5f1e782ee2ff50c4483baa.tar.bz2 mate-desktop-b60e3bd911695f8dfa5f1e782ee2ff50c4483baa.tar.xz |
Fix mate_gdk_spawn_command_line_on_screen
-rw-r--r-- | libmate-desktop/mate-desktop-utils.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libmate-desktop/mate-desktop-utils.c b/libmate-desktop/mate-desktop-utils.c index c6ae6c4..639d2af 100644 --- a/libmate-desktop/mate-desktop-utils.c +++ b/libmate-desktop/mate-desktop-utils.c @@ -190,23 +190,21 @@ mate_gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command, { GAppInfo *appinfo = NULL; GdkAppLaunchContext *context = NULL; + gboolean res = FALSE; appinfo = g_app_info_create_from_commandline (command, NULL, G_APP_INFO_CREATE_NONE, error); - if (&error != NULL) { + if (appinfo) { context = gdk_app_launch_context_new (); gdk_app_launch_context_set_screen (context, screen); - g_app_info_launch (appinfo, NULL, G_APP_LAUNCH_CONTEXT (context), error); + res = g_app_info_launch (appinfo, NULL, G_APP_LAUNCH_CONTEXT (context), error); g_object_unref (context); } if (appinfo != NULL) g_object_unref (appinfo); - if (&error != NULL) - return TRUE; - else - return FALSE; + return res; } #endif |