← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3385: Fix QueueFrame columns for file lists

 

------------------------------------------------------------
revno: 3385
fixes bug: https://launchpad.net/bugs/1228927
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Tue 2013-12-10 23:11:46 +0100
message:
  Fix QueueFrame columns for file lists
modified:
  changelog.txt
  win32/QueueFrame.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 'changelog.txt'
--- changelog.txt	2013-12-10 21:01:59 +0000
+++ changelog.txt	2013-12-10 22:11:46 +0000
@@ -8,6 +8,7 @@
 * [L#593613] Added /lastmessage in PMs to show the time of the last message (ullner)
 * [L#363092] Disallow transfer port and encrypted transfer port to be the same (ullner)
 * [L#1245179] Avoid connection failures (maksis)
+* [L#1228927] Fix columns for file lists in the Download Queue (emtee)
 
 -- 0.831 2013-11-11 --
 * [L#1249810] Fix NMDC TTH search responses (emtee)

=== modified file 'win32/QueueFrame.cpp'
--- win32/QueueFrame.cpp	2013-03-16 14:57:07 +0000
+++ win32/QueueFrame.cpp	2013-12-10 22:11:46 +0000
@@ -409,12 +409,20 @@
 			display->columns[COLUMN_ADDED] = Text::toT(Util::formatTime("%Y-%m-%d %H:%M", getAdded()));
 		}
 		if(colMask & MASK_TTH) {
-			display->columns[COLUMN_TTH] = Text::toT(getTTH().toBase32());
+			if (getTTH()) {
+				display->columns[COLUMN_TTH] = Text::toT(getTTH().toBase32());
+			} else {
+				display->columns[COLUMN_TTH] = Util::emptyStringT;
+			}
 		}
 		if(colMask & MASK_TYPE) {
-			display->columns[COLUMN_TYPE] = Text::toT(Util::getFileExt(getTarget()));
-			if(!display->columns[COLUMN_TYPE].empty() && display->columns[COLUMN_TYPE][0] == '.')
-				display->columns[COLUMN_TYPE].erase(0, 1);
+			if (isSet(QueueItem::FLAG_USER_LIST) || isSet(QueueItem::FLAG_PARTIAL_LIST)) {
+				display->columns[COLUMN_TYPE] = T_("File List");
+			} else {
+				display->columns[COLUMN_TYPE] = Text::toT(Util::getFileExt(getTarget()));
+				if(!display->columns[COLUMN_TYPE].empty() && display->columns[COLUMN_TYPE][0] == '.')
+					display->columns[COLUMN_TYPE].erase(0, 1);
+			}
 		}
 	}
 }