Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorcarlosgc <carlosgc@e12069bd-dc25-0410-a696-d39a8afcd844>2008-09-13 10:58:11 (GMT)
committer carlosgc <carlosgc@e12069bd-dc25-0410-a696-d39a8afcd844>2008-09-13 10:58:11 (GMT)
commit4ee7dc607549b12fab4e292f519d883c7ce34d7e (patch)
treedffa5bbb230a46286bef90ca735e452e4d3276f0 /shell
parent8866625581cbfb44e51d5de98dd4a8616a72a0d2 (diff)
2008-09-13 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-window.c: (launch_external_uri): Assume invalid uris are http uris. Fixes bug #552071. git-svn-id: svn+ssh://svn.gnome.org/svn/evince/trunk@3176 e12069bd-dc25-0410-a696-d39a8afcd844
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 9f27479..e6b0903 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4886,8 +4886,18 @@ launch_external_uri (EvWindow *window, EvLinkAction *action)
const gchar *uri = ev_link_action_get_uri (action);
GError *error = NULL;
gboolean ret;
+
+ if (!g_strstr_len (uri, strlen (uri), "://")) {
+ gchar *http;
+
+ /* Not a valid uri, assuming it's http */
+ http = g_strdup_printf ("http://%s", uri);
+ ret = g_app_info_launch_default_for_uri (http, NULL, &error);
+ g_free (http);
+ } else {
+ ret = g_app_info_launch_default_for_uri (uri, NULL, &error);
+ }
- ret = g_app_info_launch_default_for_uri (uri, NULL, &error);
if (ret == FALSE) {
GtkWidget *dialog;