From 49916720de793de370a6aa8f44e2264078599451 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Tue, 29 Dec 2009 00:33:12 -0500 Subject: 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 --- embed/ephy-embed.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'embed') 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); -- cgit v1.2.3