aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@gnome.org>2009-12-29 13:33:12 +0800
committerDiego Escalante Urrelo <diegoe@gnome.org>2009-12-30 03:49:08 +0800
commit49916720de793de370a6aa8f44e2264078599451 (patch)
tree2f36f4caa5ddbd21a744703ba43c538ade3752e9 /embed
parent66e555c5c4fac1c2f10c172c464a48847d13f66f (diff)
downloadgsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar.gz
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar.bz2
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar.lz
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar.xz
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.tar.zst
gsoc2013-epiphany-49916720de793de370a6aa8f44e2264078599451.zip
ephy-embed: fix download button action
Sometimes downloads can have a mime_description but a NULL helper_app in that case action is never changed so DOWNLOAD_ACTION_DOWNLOAD remains as action value. This is the same response value as Save as... button, which is wrong for the Download button. Bug #605091
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 393d82233..f44694772 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -685,6 +685,14 @@ confirm_action_from_mime (WebKitWebView *web_view,
action = DOWNLOAD_ACTION_OPEN_LOCATION;
}
+ /* Sometimes downloads can have a mime_description but a NULL helper_app
+ * in that case action is never changed so DOWNLOAD_ACTION_DOWNLOAD remains
+ * as action value. This is the same response value as Save as...
+ * button, which is wrong for the Download button.
+ */
+ if (helper_app == NULL)
+ action = DOWNLOAD_ACTION_OPEN_LOCATION;
+
action_label = (action == DOWNLOAD_ACTION_OPEN) ? GTK_STOCK_OPEN : STOCK_DOWNLOAD;
suggested_filename = webkit_download_get_suggested_filename (download);