← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2839: Fix favorite hub groups on Win XP

 

------------------------------------------------------------
revno: 2839
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2012-01-27 23:41:48 +0100
message:
  Fix favorite hub groups on Win XP
modified:
  changelog.txt
  dwt/src/widgets/Table.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	2012-01-27 22:19:56 +0000
+++ changelog.txt	2012-01-27 22:41:48 +0000
@@ -16,6 +16,7 @@
 * Add predefined user matching defs for favs (bold, more red) & ops (more blue) (poy)
 * [L#300971] Keep updating GUI elements while a menu is up (poy)
 * Color nicks in chats according to user matching definitions (poy)
+* Fix favorite hub groups on Win XP (poy)
 
 -- 0.791 2012-01-14 --
 * Update translations

=== modified file 'dwt/src/widgets/Table.cpp'
--- dwt/src/widgets/Table.cpp	2012-01-13 20:55:20 +0000
+++ dwt/src/widgets/Table.cpp	2012-01-27 22:41:48 +0000
@@ -319,11 +319,14 @@
 }
 
 void Table::setGroups(const std::vector<tstring>& groups) {
-	if(!grouped) {
-		grouped = ListView_EnableGroupView(handle(), TRUE) >= 0;
-		if(!grouped)
-			return;
-
+	bool wasGrouped = grouped;
+
+	// must be called every time on XP
+	grouped = ListView_EnableGroupView(handle(), TRUE) >= 0;
+	if(!grouped)
+		return;
+
+	if(!wasGrouped) {
 		initGroupSupport();
 	}