diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-02 10:16:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-02 10:17:20 +0800 |
commit | 8b32dcadba4c705af60b1e33b24f46d97f7181d6 (patch) | |
tree | 9ecc73e2358b7b133d92b680fe25a49814e29ef3 | |
parent | 6d346bf717c978274afa6636fdb43edcd6ac44b5 (diff) | |
download | gsoc2013-evolution-8b32dcadba4c705af60b1e33b24f46d97f7181d6.tar.gz gsoc2013-evolution-8b32dcadba4c705af60b1e33b24f46d97f7181d6.tar.zst gsoc2013-evolution-8b32dcadba4c705af60b1e33b24f46d97f7181d6.zip |
Bug 581032 – Some links can't be opened
-rw-r--r-- | e-util/e-util.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index c012b267d5..fc4f71f187 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -40,6 +40,8 @@ #include <glib/gstdio.h> #include <libgnome/gnome-init.h> +#include <camel/camel-url.h> + #ifdef G_OS_WIN32 #include <windows.h> #endif @@ -108,6 +110,7 @@ e_show_uri (GtkWindow *parent, GtkWidget *dialog; GdkScreen *screen = NULL; GError *error = NULL; + gchar *decoded_uri; guint32 timestamp; g_return_if_fail (uri != NULL); @@ -117,8 +120,11 @@ e_show_uri (GtkWindow *parent, if (parent != NULL) screen = gtk_widget_get_screen (GTK_WIDGET (parent)); - if (gtk_show_uri (screen, uri, timestamp, &error)) - return; + decoded_uri = g_strdup (uri); + camel_url_decode (decoded_uri); + + if (gtk_show_uri (screen, decoded_uri, timestamp, &error)) + goto exit; dialog = gtk_message_dialog_new_with_markup ( parent, GTK_DIALOG_DESTROY_WITH_PARENT, @@ -133,6 +139,9 @@ e_show_uri (GtkWindow *parent, gtk_widget_destroy (dialog); g_error_free (error); + +exit: + g_free (decoded_uri); } /** |