From 03652b01d2ec8a7c54fb39dd8ed660f0bbc2fa2a Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 20 Nov 2013 12:20:35 -0600 Subject: Add a button to open the account list. Also fix the account list dialog's close button. --- gui/MainWindow.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui/MainWindow.h') diff --git a/gui/MainWindow.h b/gui/MainWindow.h index 97aa0d9f..b89aab7c 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -79,6 +79,8 @@ slots: void on_actionSettings_triggered(); + void on_actionManageAccounts_triggered(); + void on_actionReportBug_triggered(); void on_actionNews_triggered(); -- cgit v1.2.3 From abf8408911c057d8aafe90790f5d2f5de0e1d97c Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 20 Nov 2013 18:31:15 -0600 Subject: Nuke and pave the old login system Also, account list now saves profile lists. --- gui/MainWindow.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gui/MainWindow.h') diff --git a/gui/MainWindow.h b/gui/MainWindow.h index b89aab7c..c0fcc385 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -21,6 +21,8 @@ #include "logic/net/LoginTask.h" #include "logic/BaseInstance.h" +#include "logic/auth/MojangAccount.h" + class QToolButton; class LabeledToolButton; class QLabel; @@ -104,8 +106,12 @@ slots: void on_actionEditInstNotes_triggered(); void doLogin(const QString &errorMsg = ""); - void doLogin(QString username, QString password); - void doAutoLogin(); + + /*! + * Launches the given instance with the given account. + * This function assumes that the given account has a valid, usable access token. + */ + void launchInstance(BaseInstance* instance, MojangAccountPtr account); void onLoginComplete(); @@ -137,8 +143,6 @@ slots: void startTask(Task *task); - void launchInstance(BaseInstance *inst, LoginResponse response); - protected: bool eventFilter(QObject *obj, QEvent *ev); void setCatBackground(bool enabled); -- cgit v1.2.3 From 75e7932607bdd84d2867765eb6f07dcec95ee193 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 22 Nov 2013 12:47:39 -0600 Subject: Properly implement launching and downloading Also added a system to select an active account to log in with. --- gui/MainWindow.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'gui/MainWindow.h') diff --git a/gui/MainWindow.h b/gui/MainWindow.h index c0fcc385..f88905bf 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -113,9 +113,11 @@ slots: */ void launchInstance(BaseInstance* instance, MojangAccountPtr account); - void onLoginComplete(); + /*! + * Prepares the given instance for launch with the given account. + */ + void prepareLaunch(BaseInstance* instance, MojangAccountPtr account); - void onGameUpdateComplete(); void onGameUpdateError(QString error); void taskStart(); @@ -160,12 +162,6 @@ private: BaseInstance *m_selectedInstance; - // A pointer to the instance we are actively doing stuff with. - // This is set when the user launches an instance and is used to refer to that - // instance throughout the launching process. - BaseInstance *m_activeInst; - LoginResponse m_activeLogin; - Task *m_versionLoadTask; QLabel *m_statusLeft; -- cgit v1.2.3