[epiphany/wip/fixes: 12/15] download: Further simplify ephy_download_do_download_action()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/fixes: 12/15] download: Further simplify ephy_download_do_download_action()
- Date: Sun, 6 Mar 2016 20:14:45 +0000 (UTC)
commit 27e0f9e37870c880c138cbd78ca69bdc7241f109
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sat Mar 5 13:26:14 2016 -0600
download: Further simplify ephy_download_do_download_action()
Let's just fall through to EPHY_DOWNLOAD_ACTION_BROWSE_TO instead of
calling ephy_file_browse_to() twice in a row.
https://bugzilla.gnome.org/show_bug.cgi?id=610586
embed/ephy-download.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index ed1e8f7..78858d2 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -438,16 +438,16 @@ ephy_download_do_download_action (EphyDownload *download,
destination = g_file_new_for_uri (destination_uri);
switch ((action ? action : download->action)) {
- case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
- LOG ("ephy_download_do_download_action: browse_to");
- ret = ephy_file_browse_to (destination, download->start_time);
- break;
case EPHY_DOWNLOAD_ACTION_OPEN:
LOG ("ephy_download_do_download_action: open");
ret = ephy_embed_shell_launch_handler (ephy_embed_shell_get_default (),
destination, NULL, download->start_time);
- if (!ret)
- ret = ephy_file_browse_to (destination, download->start_time);
+ /* Fall through if we did not open anything. */
+ if (ret)
+ break;
+ case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
+ LOG ("ephy_download_do_download_action: browse_to");
+ ret = ephy_file_browse_to (destination, download->start_time);
break;
case EPHY_DOWNLOAD_ACTION_NONE:
LOG ("ephy_download_do_download_action: none");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]