From fe6eafd44e7664b942a13cb2ac0ced50e37b7481 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Tue, 21 Jan 2014 19:41:01 +0100 Subject: libview: gdk_display_get_app_launch_context is available only in GTK3 Add fix for GTK2 --- shell/ev-application.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shell') diff --git a/shell/ev-application.c b/shell/ev-application.c index f43b10b4..96d9691b 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -288,7 +288,12 @@ ev_spawn (const char *uri, app = g_app_info_create_from_commandline (cmdline, NULL, 0, &error); if (app != NULL) { +#if GTK_CHECK_VERSION (3, 0, 0) ctx = gdk_display_get_app_launch_context (gdk_screen_get_display (screen)); +#else + ctx = gdk_app_launch_context_new (); + gdk_app_launch_context_set_display (ctx, gdk_screen_get_display (screen)); +#endif gdk_app_launch_context_set_screen (ctx, screen); gdk_app_launch_context_set_timestamp (ctx, timestamp); -- cgit v1.2.1