mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
german translation updated; no buddy/ignore list for unregistered users
This commit is contained in:
parent
731dfcad5c
commit
50de655261
10 changed files with 2610 additions and 1084 deletions
|
|
@ -166,6 +166,7 @@ void UserList::userClicked(QTreeWidgetItem *item, int /*column*/)
|
|||
void UserList::showContextMenu(const QPoint &pos, const QModelIndex &index)
|
||||
{
|
||||
const QString &userName = index.sibling(index.row(), 2).data(Qt::UserRole).toString();
|
||||
ServerInfo_User::UserLevelFlags userLevel = static_cast<ServerInfo_User::UserLevelFlags>(index.sibling(index.row(), 0).data(Qt::UserRole).toInt());
|
||||
|
||||
QAction *aUserName = new QAction(userName, this);
|
||||
aUserName->setEnabled(false);
|
||||
|
|
@ -182,15 +183,17 @@ void UserList::showContextMenu(const QPoint &pos, const QModelIndex &index)
|
|||
menu->addSeparator();
|
||||
menu->addAction(aDetails);
|
||||
menu->addAction(aChat);
|
||||
menu->addSeparator();
|
||||
if (tabSupervisor->getUserListsTab()->getBuddyList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromBuddyList);
|
||||
else
|
||||
menu->addAction(aAddToBuddyList);
|
||||
if (tabSupervisor->getUserListsTab()->getIgnoreList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromIgnoreList);
|
||||
else
|
||||
menu->addAction(aAddToIgnoreList);
|
||||
if (userLevel & ServerInfo_User::IsRegistered) {
|
||||
menu->addSeparator();
|
||||
if (tabSupervisor->getUserListsTab()->getBuddyList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromBuddyList);
|
||||
else
|
||||
menu->addAction(aAddToBuddyList);
|
||||
if (tabSupervisor->getUserListsTab()->getIgnoreList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromIgnoreList);
|
||||
else
|
||||
menu->addAction(aAddToIgnoreList);
|
||||
}
|
||||
if (!tabSupervisor->getAdminLocked()) {
|
||||
menu->addSeparator();
|
||||
menu->addAction(aBan);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue