[Xfce4-commits] <midori:master> No speed or remaining time for finished transfers

Christian Dywan noreply at xfce.org
Sun Sep 9 22:36:02 CEST 2012


Updating branch refs/heads/master
         to c8b6e07f27f102dc50fdc916719b5870de46d106 (commit)
       from ad99fb1ebbd897bea53531de3fead8732902ace0 (commit)

commit c8b6e07f27f102dc50fdc916719b5870de46d106
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Sep 9 20:52:36 2012 +0200

    No speed or remaining time for finished transfers

 midori/midori-download.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/midori/midori-download.vala b/midori/midori-download.vala
index 994a7ce..ee44a9d 100644
--- a/midori/midori-download.vala
+++ b/midori/midori-download.vala
@@ -49,6 +49,10 @@ namespace Midori {
                 format_size (download.current_size),
                 format_size (download.total_size));
 
+            /* Finished, no speed or remaining time */
+            if (is_finished (download) || download.status == WebKit.DownloadStatus.CREATED)
+                return "%s\n%s".printf (filename, size);
+
             uint64 total_size = download.total_size, current_size = download.current_size;
             double elapsed = download.get_elapsed_time (),
                diff = elapsed / current_size,


More information about the Xfce4-commits mailing list