GUI: disable ignore for own nick

This commit is contained in:
doitux
2010-03-30 19:57:44 +00:00
parent 193aaed8cb
commit 7aebea6461
2 changed files with 15 additions and 8 deletions
@@ -1332,6 +1332,18 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
nickListInviteAction->setEnabled(false);
}
if(treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt() != mySession->getClientUniquePlayerId()) {
nickListIgnorePlayerAction->setEnabled(true);
nickListIgnorePlayerAction->setText(tr("Ignore player %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt()).playerName.c_str())));
}
else {
nickListIgnorePlayerAction->setEnabled(false);
nickListIgnorePlayerAction->setText(tr("Ignore player ..."));
}
nickListContextMenu->popup(treeWidget_NickList->mapToGlobal(p));
}
}
+3 -8
View File
@@ -186,11 +186,6 @@ void GuiWrapper::SignalLobbyPlayerJoined(unsigned playerId, const string &nickNa
void GuiWrapper::SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason) { myStartWindow->signalLobbyPlayerKicked(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(byWhom.c_str()), QString::fromUtf8(reason.c_str())); }
void GuiWrapper::SignalLobbyPlayerLeft(unsigned playerId) { myStartWindow->signalLobbyPlayerLeft(playerId); }
void GuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned
playerIdFrom) { myStartWindow->signalSelfGameInvitation(gameId, playerIdFrom);
} void GuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned
playerIdWho, unsigned playerIdFrom) {
myStartWindow->signalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom); }
void GuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned
playerIdWho, DenyGameInvitationReason reason) {
myStartWindow->signalRejectedGameInvitation(gameId, playerIdWho, reason); }
void GuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom) { myStartWindow->signalSelfGameInvitation(gameId, playerIdFrom); }
void GuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom) { myStartWindow->signalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom); }
void GuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason) { myStartWindow->signalRejectedGameInvitation(gameId, playerIdWho, reason); }