[epiphany/wip/fixes: 9/15] download: Get rid of EPHY_DOWNLOAD_ACTION_DO_NOTHING



commit 1b015a69ecad4ec9930b3cc2d9c070ab6c18e5c7
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Mar 5 13:05:31 2016 -0600

    download: Get rid of EPHY_DOWNLOAD_ACTION_DO_NOTHING
    
    This differs from EPHY_DOWNLOAD_ACTION_NONE in that it explicitly
    informs EphyDownload that it should not perform any download action.
    Maybe that was actually important in the past, but nowadays there's
    absolutely no difference, so just get rid of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=610586

 embed/ephy-download.c      |    4 ----
 embed/ephy-download.h      |    3 +--
 src/popup-commands.c       |    1 -
 tests/ephy-download-test.c |    1 -
 4 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index cf88bfe..1bebdce 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -486,10 +486,6 @@ ephy_download_do_download_action (EphyDownload *download,
         LOG ("ephy_download_do_download_action: none");
         ret = TRUE;
         break;
-      case EPHY_DOWNLOAD_ACTION_DO_NOTHING:
-        LOG ("ephy_download_do_download_action: nothing");
-        ret = TRUE;
-        break;
       default:
         LOG ("ephy_download_do_download_action: unhandled action");
         ret = FALSE;
diff --git a/embed/ephy-download.h b/embed/ephy-download.h
index 6cda010..0843ea4 100644
--- a/embed/ephy-download.h
+++ b/embed/ephy-download.h
@@ -37,8 +37,7 @@ typedef enum
   EPHY_DOWNLOAD_ACTION_NONE,
   EPHY_DOWNLOAD_ACTION_AUTO,
   EPHY_DOWNLOAD_ACTION_BROWSE_TO,
-  EPHY_DOWNLOAD_ACTION_OPEN,
-  EPHY_DOWNLOAD_ACTION_DO_NOTHING
+  EPHY_DOWNLOAD_ACTION_OPEN
 } EphyDownloadActionType;
 
 EphyDownload *ephy_download_new                   (WebKitDownload *download);
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 1ed949c..1f75a3d 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -308,7 +308,6 @@ popup_cmd_set_image_as_background (GtkAction *action,
        dest_uri = g_filename_to_uri (dest, NULL, NULL);
 
        ephy_download_set_destination_uri (download, dest_uri);
-       ephy_download_set_action (download, EPHY_DOWNLOAD_ACTION_DO_NOTHING);
        ephy_downloads_manager_add_download (ephy_embed_shell_get_downloads_manager 
(ephy_embed_shell_get_default ()),
                                             download);
        g_object_unref (download);
diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c
index 4262245..7299037 100644
--- a/tests/ephy-download-test.c
+++ b/tests/ephy-download-test.c
@@ -152,7 +152,6 @@ test_ephy_download_start (Fixture *fixture, gconstpointer data)
   g_signal_connect (G_OBJECT (fixture->download), "completed",
                     G_CALLBACK (completed_cb), fixture);
 
-  ephy_download_set_action (fixture->download, EPHY_DOWNLOAD_ACTION_DO_NOTHING);
   g_main_loop_run (fixture->loop);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]