Add a button to open the account list.

Also fix the account list dialog's close button.
This commit is contained in:
Andrew 2013-11-20 12:20:35 -06:00
parent 928e0d0b15
commit 03652b01d2
5 changed files with 20 additions and 2 deletions

View File

@ -57,6 +57,7 @@
#include "gui/dialogs/IconPickerDialog.h"
#include "gui/dialogs/EditNotesDialog.h"
#include "gui/dialogs/CopyInstanceDialog.h"
#include "gui/dialogs/AccountListDialog.h"
#include "gui/ConsoleWindow.h"
@ -427,6 +428,12 @@ void MainWindow::on_actionSettings_triggered()
proxymodel->sort(0);
}
void MainWindow::on_actionManageAccounts_triggered()
{
AccountListDialog dialog(this);
dialog.exec();
}
void MainWindow::on_actionReportBug_triggered()
{
openWebPage(QUrl("http://multimc.myjetbrains.com/youtrack/dashboard#newissue=yes"));

View File

@ -79,6 +79,8 @@ slots:
void on_actionSettings_triggered();
void on_actionManageAccounts_triggered();
void on_actionReportBug_triggered();
void on_actionNews_triggered();

View File

@ -70,6 +70,7 @@
<addaction name="separator"/>
<addaction name="actionCheckUpdate"/>
<addaction name="actionSettings"/>
<addaction name="actionManageAccounts"/>
<addaction name="separator"/>
<addaction name="actionReportBug"/>
<addaction name="actionNews"/>
@ -465,6 +466,14 @@
<string>Add a new instance.</string>
</property>
</action>
<action name="actionManageAccounts">
<property name="text">
<string>Manage Accounts</string>
</property>
<property name="toolTip">
<string>Manage your Mojang or Minecraft accounts.</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>

View File

@ -56,7 +56,7 @@ void AccountListDialog::on_editAccountBtn_clicked()
// TODO
}
void AccountListDialog::on_closedBtnBox_rejected()
void AccountListDialog::on_closeBtnBox_rejected()
{
close();
}

View File

@ -43,7 +43,7 @@ slots:
void on_editAccountBtn_clicked();
// This will be sent when the "close" button is clicked.
void on_closedBtnBox_rejected();
void on_closeBtnBox_rejected();
protected:
std::shared_ptr<MojangAccountList> m_accounts;