aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-03-16 16:03:30 +0800
committerXan Lopez <xan@src.gnome.org>2009-03-16 16:03:30 +0800
commitd8922d48fb5530cf80858ea6d4eaf4c3be82d077 (patch)
tree92e43b357dd54a441c307190f3a783eab9d4ac8d /embed
parent8f44b9bbb17e54c17dd58c894d131bbb33d4fb66 (diff)
downloadgsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar.gz
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar.bz2
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar.lz
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar.xz
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.tar.zst
gsoc2013-epiphany-d8922d48fb5530cf80858ea6d4eaf4c3be82d077.zip
webkit-embed: re-add support for click-to-download.
svn path=/trunk/; revision=8908
Diffstat (limited to 'embed')
-rw-r--r--embed/webkit/webkit-embed.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c
index 66b585c51..f7e4bf43a 100644
--- a/embed/webkit/webkit-embed.c
+++ b/embed/webkit/webkit-embed.c
@@ -394,6 +394,14 @@ mime_type_policy_decision_requested_cb (WebKitWebView *web_view,
*/
g_signal_emit_by_name (embed, "ge-document-type", type);
+ /* If WebKit can't handle the mime type start the download
+ process */
+ /* FIXME: need to use ephy_file_check_mime if auto-downloading */
+ if (!webkit_web_view_can_show_mime_type (web_view, mime_type)) {
+ webkit_web_policy_decision_download (decision);
+ return TRUE;
+ }
+
return FALSE;
}