show votekick starter nick, disable kick contextmenu for only 2 players

This commit is contained in:
doitux
2008-12-07 21:47:53 +00:00
parent 0a2512da13
commit 15d934e5b8
10 changed files with 84 additions and 35 deletions
+8 -1
View File
@@ -38,8 +38,15 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
Game *currentGame = myW->getSession()->getCurrentGame();
PlayerListConstIterator it_c;
int activePlayerCounter=0;
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
if((*it_c)->getMyActiveStatus()) activePlayerCounter++;
}
if(activePlayerCounter > 2) setVoteOnKickContextMenuEnabled(TRUE);
else setVoteOnKickContextMenuEnabled(FALSE);
int i=0;
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {