]> spindle.queued.net Git - midori/commitdiff
No speed or remaining time for finished transfers
authorChristian Dywan <christian@twotoasts.de>
Sun, 9 Sep 2012 18:52:36 +0000 (20:52 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 9 Sep 2012 20:34:32 +0000 (22:34 +0200)
midori/midori-download.vala

index 994a7ce0e14a98f5be6dc0f0fed7ea1d3b018abc..ee44a9d6ac29d9ad37615fc67ea8d933f62e6fb7 100644 (file)
@@ -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,