mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-02 19:36:57 +03:00
Properly implement launching and downloading
Also added a system to select an active account to log in with.
This commit is contained in:
parent
23bc195b3c
commit
75e7932607
7 changed files with 167 additions and 122 deletions
|
|
@ -34,6 +34,7 @@ AccountListDialog::AccountListDialog(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
|
||||
m_accounts = MMC->accounts();
|
||||
// TODO: Make the "Active?" column show checkboxes or radio buttons.
|
||||
ui->listView->setModel(m_accounts.get());
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +64,17 @@ void AccountListDialog::on_editAccountBtn_clicked()
|
|||
// TODO
|
||||
}
|
||||
|
||||
void AccountListDialog::on_setActiveBtn_clicked()
|
||||
{
|
||||
QModelIndexList selection = ui->listView->selectionModel()->selectedIndexes();
|
||||
if (selection.size() > 0)
|
||||
{
|
||||
QModelIndex selected = selection.first();
|
||||
MojangAccountPtr account = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
|
||||
m_accounts->setActiveAccount(account->username());
|
||||
}
|
||||
}
|
||||
|
||||
void AccountListDialog::on_closeBtnBox_rejected()
|
||||
{
|
||||
close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue