implements: Change the behaviour of the "Display idle players" sorting

menu #112
This commit is contained in:
doitux
2012-02-04 00:11:19 +00:00
parent 59be0ff560
commit b3239ee0cc
7 changed files with 81 additions and 54 deletions
@@ -32,7 +32,7 @@ using namespace std;
gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false), autoStartTimerCounter(0)
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false), autoStartTimerCounter(0), lastNickListFilterState(0)
{
#ifdef __APPLE__
@@ -1495,12 +1495,22 @@ void gameLobbyDialogImpl::changeGameListFilter(int index)
void gameLobbyDialogImpl::changeNickListFilter(int state)
{
if(lastNickListFilterState == 0) {
myNickListSortFilterProxyModel->setLastFilterStateCountry(false);
myNickListSortFilterProxyModel->setLastFilterStateAlpha(true);
}
else if(lastNickListFilterState == 1) {
myNickListSortFilterProxyModel->setLastFilterStateCountry(true);
myNickListSortFilterProxyModel->setLastFilterStateAlpha(false);
}
myNickListSortFilterProxyModel->setFilterState(state);
myNickListModel->sort(0, Qt::DescendingOrder);
myNickListSortFilterProxyModel->setFilterRegExp(QString());
myNickListSortFilterProxyModel->setFilterKeyColumn(0);
lastNickListFilterState = state;
writeDialogSettings(2);
}