diff options
author | Stefano Karapetsas <[email protected]> | 2013-07-25 15:13:25 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-07-25 15:13:25 +0200 |
commit | a823c728f14e2600fbbcd6ad14e6305331e80bf2 (patch) | |
tree | 429b9f7992d41b518470e148e5f41d55cbf9b405 /src/caja-window-menus.c | |
parent | a4f91079a8a8dda83614148ac50e7ef7e162c9b1 (diff) | |
download | caja-a823c728f14e2600fbbcd6ad14e6305331e80bf2.tar.bz2 caja-a823c728f14e2600fbbcd6ad14e6305331e80bf2.tar.xz |
src: Add GTK3/GDK3 support
Diffstat (limited to 'src/caja-window-menus.c')
-rw-r--r-- | src/caja-window-menus.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c index 82d4c4d6..5d1bd371 100644 --- a/src/caja-window-menus.c +++ b/src/caja-window-menus.c @@ -574,15 +574,31 @@ action_caja_manual_callback (GtkAction *action, if (CAJA_IS_DESKTOP_WINDOW (window)) { -#if GTK_CHECK_VERSION(2, 24, 0) +#if GTK_CHECK_VERSION (3, 0, 0) + GdkScreen *screen; + GdkAppLaunchContext *launch_context; + GAppInfo *app_info = NULL; + app_info = g_app_info_create_from_commandline ("mate-help", + NULL, + G_APP_INFO_CREATE_NONE, + &error); + if (error == NULL) + { + screen = gtk_window_get_screen(GTK_WINDOW(window)); + 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), &error); + g_object_unref (launch_context); + } + if (app_info != NULL) + g_object_unref (app_info); +#else +#if GTK_CHECK_VERSION (2, 24, 0) gdk_spawn_command_line_on_screen(gtk_window_get_screen(GTK_WINDOW(window)), "mate-help", &error); #else - - - g_spawn_command_line_async("mate-help", &error); #endif - +#endif } else { |