Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-10-04 17:20:34 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-10-04 17:20:34 (GMT)
commit047fc3d035e7d724e5291b8818f486bc52ac132c (patch)
treea5e329952c72a5351fbf637bbf11c42894637b39 /shell
parentc55919def7a3cea9865fa9dfa133de6852d0a433 (diff)
Use GdkAppLaunchContext when available to launch external applications.
2008-10-04 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-window.c: (launch_action): Use GdkAppLaunchContext when available to launch external applications. svn path=/trunk/; revision=3214
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 75120ba..44a68c6 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4836,6 +4836,7 @@ launch_action (EvWindow *window, EvLinkAction *action)
GAppInfo *app_info;
GFile *file;
GList file_list = {NULL};
+ GAppLaunchContext *context = NULL;
GError *error = NULL;
if (filename == NULL)
@@ -4863,11 +4864,16 @@ launch_action (EvWindow *window, EvLinkAction *action)
return;
}
+
+#if GTK_CHECK_VERSION (2, 14, 0)
+ context = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ());
+ gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (context),
+ gtk_window_get_screen (GTK_WINDOW (window)));
+ gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), GDK_CURRENT_TIME);
+#endif
file_list.data = file;
-
- /* FIXME: should we use a GAppLaunchContext? */
- if (!g_app_info_launch (app_info, &file_list, NULL, &error)) {
+ if (!g_app_info_launch (app_info, &file_list, context, &error)) {
/* FIXME: use ev_window_error_message */
g_warning ("%s", error->message);
g_error_free (error);