evince r3176 - in trunk: . shell
- From: carlosgc svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3176 - in trunk: . shell
- Date: Sat, 13 Sep 2008 10:58:12 +0000 (UTC)
Author: carlosgc
Date: Sat Sep 13 10:58:11 2008
New Revision: 3176
URL: http://svn.gnome.org/viewvc/evince?rev=3176&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/shell/ev-window.c
Modified: trunk/shell/ev-window.c
==============================================================================
--- trunk/shell/ev-window.c (original)
+++ trunk/shell/ev-window.c Sat Sep 13 10:58:11 2008
@@ -4886,8 +4886,18 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]