From d740578688721cbfaf753c7ecb81d85d25bb9ccd Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 19 Nov 2014 18:38:56 +0100 Subject: Gtk3: use gdk_display_get_app_launch_context instead of gdk_app_launch_context_new Taken from FR commit: 02f2fa8dc6c41d04e105b02f662b23a2c910d6cb From: Paolo Bacchilega --- src/fr-window.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/fr-window.c') diff --git a/src/fr-window.c b/src/fr-window.c index 35c9bd7..6476ee0 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -8013,7 +8013,11 @@ fr_window_open_files_with_application (FrWindow *window, for (scan = file_list; scan; scan = scan->next) uris = g_list_prepend (uris, g_filename_to_uri (scan->data, NULL, NULL)); +#if GTK_CHECK_VERSION (3, 0, 0) + context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (window))); +#else context = gdk_app_launch_context_new (); +#endif gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (GTK_WIDGET (window))); gdk_app_launch_context_set_timestamp (context, 0); @@ -8263,7 +8267,11 @@ fr_window_open_extracted_files (OpenFilesData *odata) } } +#if GTK_CHECK_VERSION (3, 0, 0) + context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (odata->window))); +#else context = gdk_app_launch_context_new (); +#endif gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (GTK_WIDGET (odata->window))); gdk_app_launch_context_set_timestamp (context, 0); result = g_app_info_launch_uris (app, files_to_open, G_APP_LAUNCH_CONTEXT (context), &error); -- cgit v1.2.1