diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2008-09-13 11:16:56 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2008-09-13 11:16:56 (GMT) |
commit | 8e5c34c8f897e3723cf5c4ebe08f7650fd3b9954 (patch) | |
tree | 1a61d6b85616cf7752a74cd85fbcd611c0f8660c | |
parent | d1ae25cdb0f86c2fc8ce406fd3b53f91a5d002ab (diff) |
Use GdkAppLaunchContext when available to launch external uris.
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | shell/ev-window.c | 9 |
2 files changed, 15 insertions, 0 deletions
@@ -2,6 +2,12 @@ * 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): + Use the message area to show errors when lauching external uris instead of a popup window. diff --git a/shell/ev-window.c b/shell/ev-window.c index 5c345e3..fc8cc8d 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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; |