linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01952
[Branch ~linuxdcpp-team/linuxdcpp/trunk] Rev 391: Fix for finished trasfers total size and speed counting
------------------------------------------------------------
revno: 391
fixes bug(s): https://launchpad.net/bugs/641298
committer: Razzloss <razzloss@xxxxxxxxx>
branch nick: master
timestamp: Sat 2010-09-18 20:51:54 +0300
message:
Fix for finished trasfers total size and speed counting
modified:
linux/finishedtransfers.cc
--
lp:linuxdcpp
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk
Your team LinuxDC++ Team is subscribed to branch lp:linuxdcpp.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk/+edit-subscription
=== modified file 'linux/finishedtransfers.cc'
--- linux/finishedtransfers.cc 2010-08-05 05:31:49 +0000
+++ linux/finishedtransfers.cc 2010-09-18 17:51:54 +0000
@@ -112,11 +112,24 @@
int64_t speed = Util::toInt64(params["Average Speed"]);
int64_t time = Util::toInt64(params["Elapsed Time"]);
- if (!findFile_gui(&iter, params["Target"]))
+ if (!isUpload || !findFile_gui(&iter, params["Target"]))
{
gtk_list_store_append(fileStore, &iter);
totalFiles++;
}
+
+ if (!isUpload)
+ {
+ totalTime += time;
+ totalBytes += size;
+ }
+ else
+ {
+ totalTime += (time - fileView.getValue<int64_t>(&iter, "Elapsed Time"));
+ totalBytes += (size - fileView.getValue<int64_t>(&iter, "Size"));
+
+ }
+
gtk_list_store_set(fileStore, &iter,
fileView.col("Time"), params["Time"].c_str(),
fileView.col("Filename"), params["Filename"].c_str(),