summaryrefslogtreecommitdiff
path: root/eel/eel-mate-extensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'eel/eel-mate-extensions.c')
-rw-r--r--eel/eel-mate-extensions.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/eel/eel-mate-extensions.c b/eel/eel-mate-extensions.c
index 2af5a941..f1974397 100644
--- a/eel/eel-mate-extensions.c
+++ b/eel/eel-mate-extensions.c
@@ -31,7 +31,7 @@
#include "eel-mate-extensions.h"
#include <gtk/gtk.h>
-#include <libmate/mate-desktop-utils.h>
+#include <libmate-desktop/mate-desktop-utils.h>
/* Return a command string containing the path to a terminal on this system. */
@@ -194,7 +194,24 @@ eel_mate_open_terminal_on_screen (const char *command,
g_message ("Could not start a terminal");
return;
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkAppLaunchContext *launch_context;
+ GAppInfo *app_info = NULL;
+ app_info = g_app_info_create_from_commandline (command_line,
+ NULL,
+ G_APP_INFO_CREATE_NONE,
+ NULL);
+ if (app_info != NULL)
+ {
+ launch_context = gdk_app_launch_context_new ();
+ gdk_app_launch_context_set_screen (launch_context, screen);
+ g_app_info_launch (app_info, NULL, G_APP_LAUNCH_CONTEXT (launch_context), NULL);
+ g_object_unref (launch_context);
+ g_object_unref (app_info);
+ }
+#else
gdk_spawn_command_line_on_screen (screen, command_line, NULL);
+#endif
g_free (command_line);
}