← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3025: Show more info about files beeing uploaded

 

------------------------------------------------------------
revno: 3025
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Wed 2012-08-08 18:25:39 +0200
message:
  Show more info about files beeing uploaded
modified:
  dcpp/UploadManager.cpp
  win32/TransferView.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/UploadManager.cpp'
--- dcpp/UploadManager.cpp	2012-08-07 18:09:26 +0000
+++ dcpp/UploadManager.cpp	2012-08-08 16:25:39 +0000
@@ -502,7 +502,7 @@
 		}
 	}
 	for(auto it = notifyList.cbegin(); it != notifyList.cend(); ++it)
-		ClientManager::getInstance()->connect((*it).user, (*it).token);
+		ClientManager::getInstance()->connect(it->user, it->token);
 }
 
 void UploadManager::on(TimerManagerListener::Minute, uint64_t  aTick ) noexcept {

=== modified file 'win32/TransferView.cpp'
--- win32/TransferView.cpp	2012-07-11 17:13:42 +0000
+++ win32/TransferView.cpp	2012-08-08 16:25:39 +0000
@@ -722,9 +722,16 @@
 	} else if(t->getType() == Transfer::TYPE_FULL_LIST || t->getType() == Transfer::TYPE_PARTIAL_LIST) {
 		file = T_("file list");
 	} else {
-		file = Text::toT(Util::getFileName(t->getPath()) +
-			" (" + Util::formatBytes(t->getStartPos()) +
-			" - " + Util::formatBytes(t->getStartPos() + t->getSize()) + ")");
+		string path, total = Util::emptyString;
+		if (dynamic_cast <Upload*> (t)) {
+			path = "<" + t->getPath() + ">";
+			WinUtil::reducePaths(path);
+			total = _(" of ") + Util::formatBytes(File::getSize(t->getPath()));
+		} else {
+			path = Util::getFileName(t->getPath());
+		}
+		file = Text::toT(path + " (" + Util::formatBytes(t->getStartPos()) +
+			" - " + Util::formatBytes(t->getStartPos() + t->getSize()) + total + ")");
 	}
 	return file;
 }