NOISSUE mark used accounts/sessions in selection menus

This commit is contained in:
Petr Mrázek committed 2016-11-17 01:00:15 +01:00
1 parent 3769897be1
commit 12f6534e77
13 files changed
+194 -5

No files matched your search

+6 -1
View File
@@ -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);