diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 7e1c2658..025151f4 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -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)); } } diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index af5f1cf5..d78bd238 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -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); }