[Xfce4-commits] <midori:master> Ensure that download last-size is stored as a pointer

Christian Dywan noreply at xfce.org
Wed Apr 17 01:16:02 CEST 2013


Updating branch refs/heads/master
         to 8a1d08d4f5488ec6e3399410e69726bcb446a39a (commit)
       from be18f418e723e30547a2ad25006b86f7e567ad02 (commit)

commit 8a1d08d4f5488ec6e3399410e69726bcb446a39a
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Apr 17 00:14:38 2013 +0200

    Ensure that download last-size is stored as a pointer
    
    Fixes: https://bugs.launchpad.net/midori/+bug/1053386

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

diff --git a/midori/midori-download.vala b/midori/midori-download.vala
index 951332b..bbf485e 100644
--- a/midori/midori-download.vala
+++ b/midori/midori-download.vala
@@ -97,7 +97,7 @@ namespace Midori {
             }
 
             string speed = "";
-            uint64 last_size = download.get_data<uint64> ("last-size");
+            uint64? last_size = download.get_data<uint64?> ("last-size");
             if (elapsed != last_time) {
                 speed = format_size ((uint64)(
                     (current_size - last_size) / (elapsed - last_time)));
@@ -110,7 +110,7 @@ namespace Midori {
 
             if (elapsed - last_time > 5.0) {
                 download.set_data<int> ("last-time", (int)elapsed);
-                download.set_data<uint64> ("last-size", current_size);
+                download.set_data<uint64?> ("last-size", current_size);
             }
 
             return "%s\n%s %s%s".printf (filename, size, speed, eta);


More information about the Xfce4-commits mailing list