diff options
author | Stefano Karapetsas <[email protected]> | 2013-07-25 15:12:17 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-07-25 15:12:17 +0200 |
commit | b965494b9c67f1e407c9c26bcc580e15838a64d3 (patch) | |
tree | 56ada15b8d8fae1073973f7e31d5d512e06056ef /eel | |
parent | a706a5994f0b704a3016416983dccce536ebe5f5 (diff) | |
download | caja-b965494b9c67f1e407c9c26bcc580e15838a64d3.tar.bz2 caja-b965494b9c67f1e407c9c26bcc580e15838a64d3.tar.xz |
eel: Add GDK3 support
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-mate-extensions.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/eel/eel-mate-extensions.c b/eel/eel-mate-extensions.c index 77f8eaff..f1974397 100644 --- a/eel/eel-mate-extensions.c +++ b/eel/eel-mate-extensions.c @@ -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); } |