german translation updated; no buddy/ignore list for unregistered users

This commit is contained in:
Max-Wilhelm Bruker 2011-03-03 17:36:11 +01:00
parent 731dfcad5c
commit 50de655261
10 changed files with 2610 additions and 1084 deletions

View file

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