summaryrefslogtreecommitdiff
path: root/mate-panel/libpanel-util/panel-launch.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/libpanel-util/panel-launch.c')
-rw-r--r--mate-panel/libpanel-util/panel-launch.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mate-panel/libpanel-util/panel-launch.c b/mate-panel/libpanel-util/panel-launch.c
index af2b4282..5479daaa 100644
--- a/mate-panel/libpanel-util/panel-launch.c
+++ b/mate-panel/libpanel-util/panel-launch.c
@@ -58,13 +58,10 @@ _panel_launch_handle_error (const gchar *name,
GError *local_error,
GError **error)
{
- if (local_error == NULL)
- return TRUE;
-
- else if (g_error_matches (local_error,
- G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
- g_error_free (local_error);
- return TRUE;
+ if (g_error_matches (local_error,
+ G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (local_error);
+ return TRUE;
}
else if (error != NULL)
@@ -104,6 +101,9 @@ panel_app_info_launch_uris (GAppInfo *appinfo,
g_object_unref (context);
+ if ((local_error == NULL) && (retval == TRUE))
+ return TRUE;
+
return _panel_launch_handle_error (g_app_info_get_name (appinfo),
screen, local_error, error);
}
@@ -229,6 +229,9 @@ panel_launch_desktop_file_with_fallback (const char *desktop_file,
G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, &local_error);
+ if (local_error == NULL && retval == TRUE)
+ return TRUE;
+
return _panel_launch_handle_error (fallback_exec,
screen, local_error, error);
}