mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -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
|
|
@ -72,6 +72,7 @@ void PlayerListWidget::updatePlayerProperties(ServerInfo_PlayerProperties *prop)
|
|||
|
||||
player->setIcon(1, prop->getSpectator() ? spectatorIcon : playerIcon);
|
||||
player->setIcon(2, gameStarted ? (prop->getConceded() ? concededIcon : QIcon()) : (prop->getReadyStart() ? readyIcon : notReadyIcon));
|
||||
player->setData(3, Qt::UserRole, prop->getUserInfo()->getUserLevel());
|
||||
player->setIcon(3, QIcon(UserLevelPixmapGenerator::generatePixmap(12, prop->getUserInfo()->getUserLevel())));
|
||||
player->setText(4, prop->getUserInfo()->getName());
|
||||
if (!prop->getUserInfo()->getCountry().isEmpty())
|
||||
|
|
@ -131,6 +132,7 @@ void PlayerListWidget::showContextMenu(const QPoint &pos, const QModelIndex &ind
|
|||
{
|
||||
const QString &userName = index.sibling(index.row(), 4).data(Qt::UserRole).toString();
|
||||
int playerId = index.sibling(index.row(), 4).data(Qt::UserRole + 1).toInt();
|
||||
ServerInfo_User::UserLevelFlags userLevel = static_cast<ServerInfo_User::UserLevelFlags>(index.sibling(index.row(), 3).data(Qt::UserRole).toInt());
|
||||
|
||||
QAction *aUserName = new QAction(userName, this);
|
||||
aUserName->setEnabled(false);
|
||||
|
|
@ -147,15 +149,17 @@ void PlayerListWidget::showContextMenu(const QPoint &pos, const QModelIndex &ind
|
|||
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 (gameCreator) {
|
||||
menu->addSeparator();
|
||||
menu->addAction(aKick);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue