diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-11-15 02:51:22 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-11-17 01:00:15 +0100 |
commit | 12f6534e77d28ba5dc5fd5f555d43e7cd9da9336 (patch) | |
tree | 677c82d8d1a50c7027610e9602e423a568ae7762 /application | |
parent | 3769897be19308ada8b975ecf541a3b200b5eb14 (diff) | |
download | PrismLauncher-12f6534e77d28ba5dc5fd5f555d43e7cd9da9336.tar.gz PrismLauncher-12f6534e77d28ba5dc5fd5f555d43e7cd9da9336.tar.bz2 PrismLauncher-12f6534e77d28ba5dc5fd5f555d43e7cd9da9336.zip |
NOISSUE mark used accounts/sessions in selection menus
Diffstat (limited to 'application')
-rw-r--r-- | application/MainWindow.cpp | 7 | ||||
-rw-r--r-- | application/dialogs/ProfileSelectDialog.cpp | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 70a0fbf1..5ef32804 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -726,7 +726,12 @@ void MainWindow::repopulateAccountsMenu() MojangAccountPtr account = accounts->at(i); for (auto profile : account->profiles()) { - QAction *action = new QAction(profile.name, this); + auto profileLabel = profile.name; + if(account->isInUse()) + { + profileLabel += tr(" (in use)"); + } + QAction *action = new QAction(profileLabel, this); action->setData(account->username()); action->setCheckable(true); if (active_username == account->username()) diff --git a/application/dialogs/ProfileSelectDialog.cpp b/application/dialogs/ProfileSelectDialog.cpp index 5c42bc7b..1bd8d06a 100644 --- a/application/dialogs/ProfileSelectDialog.cpp +++ b/application/dialogs/ProfileSelectDialog.cpp @@ -50,8 +50,13 @@ ProfileSelectDialog::ProfileSelectDialog(const QString &message, int flags, QWid MojangAccountPtr account = m_accounts->at(i); for (auto profile : account->profiles()) { + auto profileLabel = profile.name; + if(account->isInUse()) + { + profileLabel += tr(" (in use)"); + } auto item = new QTreeWidgetItem(view); - item->setText(0, profile.name); + item->setText(0, profileLabel); item->setIcon(0, SkinUtils::getFaceFromCache(profile.id)); item->setData(0, MojangAccountList::PointerRole, QVariant::fromValue(account)); items.append(item); |