diff options
author | Xan Lopez <xan@gnome.org> | 2009-12-03 03:39:47 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-12-03 03:39:47 +0800 |
commit | 82a5da33bdcd8673cbf48de1159ae4f65fec8f64 (patch) | |
tree | 77f62ebf36f78fef782630d341ba34e297aab64e /embed/ephy-embed.c | |
parent | bb07ab9d3b02808619434fe5ab48318fdb749434 (diff) | |
download | gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar.gz gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar.bz2 gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar.lz gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar.xz gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.tar.zst gsoc2013-epiphany-82a5da33bdcd8673cbf48de1159ae4f65fec8f64.zip |
ephy-embed: reimplent EphyEmbedSingle 'handle-content' signal
This is used by external download managers like gwget.
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r-- | embed/ephy-embed.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index b49ab0fc6..16f9ded00 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -393,7 +393,19 @@ mime_type_policy_decision_requested_cb (WebKitWebView *web_view, 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); + GObject *single; + const char *uri; + gboolean handled = FALSE; + + single = ephy_embed_shell_get_embed_single (embed_shell); + uri = webkit_network_request_get_uri (request); + g_signal_emit_by_name (single, "handle-content", mime_type, uri, &handled); + + if (handled) + webkit_web_policy_decision_ignore (decision); + else + webkit_web_policy_decision_download (decision); + return TRUE; } |