]> www.fi.muni.cz Git - evince.git/commitdiff
Use GdkAppLaunchContext when available to launch external uris.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 13 Sep 2008 11:16:56 +0000 (11:16 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sat, 13 Sep 2008 11:16:56 +0000 (11:16 +0000)
2008-09-13  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/ev-window.c: (launch_external_uri):

Use GdkAppLaunchContext when available to launch external uris.

svn path=/trunk/; revision=3178

ChangeLog
shell/ev-window.c

index a56340e5876ebc8fea2f617089bce8842ab87f44..1bbe20e46e7ca2bf5f143b931e21223b4436f43e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-13  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (launch_external_uri):
+
+       Use GdkAppLaunchContext when available to launch external uris.
+       
 2008-09-13  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (launch_external_uri):
index 5c345e3941529975786398086ab22f6c749e9a19..fc8cc8dc2ba3838002b529af113903e9fbc0517a 100644 (file)
@@ -4884,9 +4884,18 @@ static void
 launch_external_uri (EvWindow *window, EvLinkAction *action)
 {
        const gchar *uri = ev_link_action_get_uri (action);
+       GAppLaunchContext *context = NULL;
        GError *error = NULL;
        gboolean ret;
 
+#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
+
        if (!g_strstr_len (uri, strlen (uri), "://")) {
                gchar *http;