[epiphany/wip/exalm/timestamps: 5/6] download: Drop timestamp from do_download_action()




commit 8baadc3a3fa94b1a31c77372d6ac48de8c7343a2
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Mar 22 20:08:50 2022 +0400

    download: Drop timestamp from do_download_action()
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1096>

 embed/ephy-download.c                | 12 +++++-------
 embed/ephy-download.h                |  3 +--
 lib/widgets/ephy-download-widget.c   |  3 +--
 lib/widgets/ephy-downloads-popover.c |  3 +--
 4 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 2abc2908e..ba8a02235 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -397,7 +397,6 @@ ephy_download_failed (EphyDownload  *download,
  * ephy_download_do_download_action:
  * @download: an #EphyDownload
  * @action: one of #EphyDownloadActionType
- * @user_time: GDK timestamp, for focus-stealing prevention
  *
  * Executes the given @action for @download, this can be any of
  * #EphyDownloadActionType.
@@ -407,8 +406,7 @@ ephy_download_failed (EphyDownload  *download,
  **/
 gboolean
 ephy_download_do_download_action (EphyDownload           *download,
-                                  EphyDownloadActionType  action,
-                                  guint32                 user_time)
+                                  EphyDownloadActionType  action)
 {
   GFile *destination;
   const char *destination_uri;
@@ -421,13 +419,13 @@ ephy_download_do_download_action (EphyDownload           *download,
     case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
       LOG ("ephy_download_do_download_action: browse_to");
       /* Must not use this action type under sandbox! */
-      ret = ephy_file_browse_to (destination, user_time);
+      ret = ephy_file_browse_to (destination, GDK_CURRENT_TIME);
       break;
     case EPHY_DOWNLOAD_ACTION_OPEN:
       LOG ("ephy_download_do_download_action: open");
-      ret = ephy_file_launch_handler (destination, user_time);
+      ret = ephy_file_launch_handler (destination, GDK_CURRENT_TIME);
       if (!ret)
-        ret = ephy_file_browse_to (destination, user_time);
+        ret = ephy_file_browse_to (destination, GDK_CURRENT_TIME);
       break;
     case EPHY_DOWNLOAD_ACTION_NONE:
       LOG ("ephy_download_do_download_action: none");
@@ -719,7 +717,7 @@ download_finished_cb (WebKitDownload *wk_download,
 
   download->finished = TRUE;
 
-  ephy_download_do_download_action (download, download->action, GDK_CURRENT_TIME);
+  ephy_download_do_download_action (download, download->action);
 
   if (download->show_notification)
     display_download_finished_notification (wk_download);
diff --git a/embed/ephy-download.h b/embed/ephy-download.h
index 07b25d9ca..1b6224439 100644
--- a/embed/ephy-download.h
+++ b/embed/ephy-download.h
@@ -58,8 +58,7 @@ EphyDownloadActionType ephy_download_get_action   (EphyDownload *download);
 void          ephy_download_set_action            (EphyDownload *download,
                                                    EphyDownloadActionType action);
 gboolean      ephy_download_do_download_action    (EphyDownload          *download,
-                                                   EphyDownloadActionType action,
-                                                   guint32                user_time);
+                                                   EphyDownloadActionType action);
 void          ephy_download_disable_desktop_notification
                                                   (EphyDownload *download);
 
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 7af21a9b9..113996794 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -272,8 +272,7 @@ widget_action_button_clicked_cb (EphyDownloadWidget *widget)
     ephy_downloads_manager_remove_download (manager, widget->download);
   } else {
     ephy_download_do_download_action (widget->download,
-                                      EPHY_DOWNLOAD_ACTION_BROWSE_TO,
-                                      GDK_CURRENT_TIME);
+                                      EPHY_DOWNLOAD_ACTION_BROWSE_TO);
   }
 }
 
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index 767147888..420b1edae 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -51,8 +51,7 @@ download_box_row_activated_cb (EphyDownloadsPopover *popover,
     return;
 
   ephy_download_do_download_action (download,
-                                    EPHY_DOWNLOAD_ACTION_OPEN,
-                                    GDK_CURRENT_TIME);
+                                    EPHY_DOWNLOAD_ACTION_OPEN);
 }
 
 static void


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