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));
}
}