aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@0d.be>2009-10-10 02:07:20 +0800
committerXan Lopez <xan@gnome.org>2009-10-19 00:32:28 +0800
commit7a31aae32f3638ec99f432795f5c721b60e67268 (patch)
tree9e37102406b2c55080b26c11ae12b8d3d78309ae /src/ephy-window.c
parent437e08e9303dfe186d14b1cd3b2e9226c61feb4e (diff)
downloadgsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar.gz
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar.bz2
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar.lz
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar.xz
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.tar.zst
gsoc2013-epiphany-7a31aae32f3638ec99f432795f5c721b60e67268.zip
Pass mailto: URI to gtk_show_uri()
(Part of) Bug #584537 Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 59a06c72d..61cc17c8c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2529,10 +2529,18 @@ policy_decision_required_cb (WebKitWebView *web_view,
WebKitWebNavigationReason reason;
gint button;
gint state;
+ const char *uri;
reason = webkit_web_navigation_action_get_reason (action);
button = webkit_web_navigation_action_get_button (action);
state = webkit_web_navigation_action_get_modifier_state (action);
+ uri = webkit_network_request_get_uri (request);
+
+ if (g_str_has_prefix (uri, "mailto:")) {
+ webkit_web_policy_decision_ignore (decision);
+ gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL);
+ return TRUE;
+ }
/* Open in new tab for middle click or ctrl+click */
if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&