Update of /cvsroot/dcplusplus/dcplusplus/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6640/windows
Modified Files:
TransferView.h HubFrame.h AppearancePage.cpp
Log Message:
More pedantry, sort order patch
Index: AppearancePage.cpp
===================================================================
RCS file: /cvsroot/dcplusplus/dcplusplus/windows/AppearancePage.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** AppearancePage.cpp 12 Oct 2005 14:02:53 -0000 1.28
--- AppearancePage.cpp 19 Feb 2006 17:19:05 -0000 1.29
***************
*** 46,49 ****
--- 46,50 ----
PropPage::ListItem AppearancePage::listItems[] = {
+ { SettingsManager::ALT_SORT_ORDER, ResourceManager::SETTINGS_ALT_SORT_ORDER },
{ SettingsManager::FILTER_MESSAGES, ResourceManager::SETTINGS_FILTER_MESSAGES },
{ SettingsManager::MINIMIZE_TRAY, ResourceManager::SETTINGS_MINIMIZE_TRAY },
Index: HubFrame.h
===================================================================
RCS file: /cvsroot/dcplusplus/dcplusplus/windows/HubFrame.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** HubFrame.h 19 Feb 2006 16:19:06 -0000 1.74
--- HubFrame.h 19 Feb 2006 17:19:05 -0000 1.75
***************
*** 188,193 ****
User::Ptr user;
Identity identity;
! }
!
friend struct CompareItems;
--- 188,192 ----
User::Ptr user;
Identity identity;
! };
friend struct CompareItems;
Index: TransferView.h
===================================================================
RCS file: /cvsroot/dcplusplus/dcplusplus/windows/TransferView.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** TransferView.h 19 Feb 2006 16:19:06 -0000 1.26
--- TransferView.h 19 Feb 2006 17:19:05 -0000 1.27
***************
*** 176,187 ****
static int compareItems(ItemInfo* a, ItemInfo* b, int col) {
! if(a->status == b->status) {
! if(a->download != b->download) {
return a->download ? -1 : 1;
}
} else {
! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1;
}
-
switch(col) {
case COLUMN_STATUS: return 0;
--- 176,196 ----
static int compareItems(ItemInfo* a, ItemInfo* b, int col) {
! if(BOOLSETTING(ALT_SORT_ORDER)) {
! if(a->download == b->download) {
! if(a->status != b->status) {
! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1;
! }
! } else {
return a->download ? -1 : 1;
}
} else {
! if(a->status == b->status) {
! if(a->download != b->download) {
! return a->download ? -1 : 1;
! }
! } else {
! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1;
! }
}
switch(col) {
case COLUMN_STATUS: return 0;
|