diff options
author | infirit <[email protected]> | 2014-11-19 18:38:56 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-19 19:36:03 +0100 |
commit | d740578688721cbfaf753c7ecb81d85d25bb9ccd (patch) | |
tree | 31a8285be265aa81b050c00212fa16915ad45b44 | |
parent | 9624581205a12761ff236d4d86df4b787d4db003 (diff) | |
download | engrampa-d740578688721cbfaf753c7ecb81d85d25bb9ccd.tar.bz2 engrampa-d740578688721cbfaf753c7ecb81d85d25bb9ccd.tar.xz |
Gtk3: use gdk_display_get_app_launch_context instead of gdk_app_launch_context_new
Taken from FR commit: 02f2fa8dc6c41d04e105b02f662b23a2c910d6cb
From: Paolo Bacchilega <[email protected]>
-rw-r--r-- | src/fr-window.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |