From ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Mon, 27 Jan 2014 03:00:49 +0100 Subject: Offline mode can be used even when online. Allow the user to pick a player name for offline mode. Big auth refactor. Now using session objects instead of the accounts themselves. Sessions only last for one instance start and hold all the auth and player data. --- gui/dialogs/AccountListDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/dialogs') diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp index 1712e352..a38035a6 100644 --- a/gui/dialogs/AccountListDialog.cpp +++ b/gui/dialogs/AccountListDialog.cpp @@ -126,7 +126,7 @@ void AccountListDialog::addAccount(const QString& errMsg) MojangAccountPtr account = MojangAccount::createFromUsername(username); ProgressDialog progDialog(this); - auto task = account->login(password); + auto task = account->login(nullptr, password); progDialog.exec(task.get()); if(task->successful()) { -- cgit From b4b6091372310f4a811180cffde3ea5611881e6c Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Wed, 29 Jan 2014 01:20:19 +0100 Subject: Add 'empty text' to all the version selection dialogs. Customize it for the Forge one so people finally shut up about 1.7.4 --- gui/dialogs/OneSixModEditDialog.cpp | 11 +++++++---- gui/dialogs/VersionSelectDialog.cpp | 5 +++++ gui/dialogs/VersionSelectDialog.h | 1 + gui/dialogs/VersionSelectDialog.ui | 9 ++++++++- 4 files changed, 21 insertions(+), 5 deletions(-) (limited to 'gui/dialogs') diff --git a/gui/dialogs/OneSixModEditDialog.cpp b/gui/dialogs/OneSixModEditDialog.cpp index 3982f17d..27315c69 100644 --- a/gui/dialogs/OneSixModEditDialog.cpp +++ b/gui/dialogs/OneSixModEditDialog.cpp @@ -142,7 +142,8 @@ void OneSixModEditDialog::on_customEditorBtn_clicked() { if (!MMC->openJsonEditor(m_inst->instanceRoot() + "/custom.json")) { - QMessageBox::warning(this, tr("Error"), tr("Unable to open custom.json, check the settings")); + QMessageBox::warning(this, tr("Error"), + tr("Unable to open custom.json, check the settings")); } } } @@ -151,6 +152,8 @@ void OneSixModEditDialog::on_forgeBtn_clicked() { VersionSelectDialog vselect(MMC->forgelist().get(), tr("Select Forge version"), this); vselect.setFilter(1, m_inst->currentVersionId()); + vselect.setEmptyString(tr("No Forge versions are currently available for Minecraft ") + + m_inst->currentVersionId()); if (vselect.exec() && vselect.selectedVersion()) { if (m_inst->versionIsCustom()) @@ -240,9 +243,9 @@ void OneSixModEditDialog::on_liteloaderBtn_clicked() } if (!liteloader.apply(m_version)) { - QMessageBox::critical( - this, tr("LiteLoader"), - tr("For reasons unknown, the LiteLoader installation failed. Check your MultiMC log files for details.")); + QMessageBox::critical(this, tr("LiteLoader"), + tr("For reasons unknown, the LiteLoader installation failed. " + "Check your MultiMC log files for details.")); } } diff --git a/gui/dialogs/VersionSelectDialog.cpp b/gui/dialogs/VersionSelectDialog.cpp index d6efe3c0..0f379f56 100644 --- a/gui/dialogs/VersionSelectDialog.cpp +++ b/gui/dialogs/VersionSelectDialog.cpp @@ -51,6 +51,11 @@ VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, } } +void VersionSelectDialog::setEmptyString(QString emptyString) +{ + ui->listView->setEmptyString(emptyString); +} + VersionSelectDialog::~VersionSelectDialog() { delete ui; diff --git a/gui/dialogs/VersionSelectDialog.h b/gui/dialogs/VersionSelectDialog.h index e36341db..61fa8ab6 100644 --- a/gui/dialogs/VersionSelectDialog.h +++ b/gui/dialogs/VersionSelectDialog.h @@ -44,6 +44,7 @@ public: BaseVersionPtr selectedVersion() const; void setFilter(int column, QString filter); + void setEmptyString(QString emptyString); void setResizeOn(int column); private diff --git a/gui/dialogs/VersionSelectDialog.ui b/gui/dialogs/VersionSelectDialog.ui index 58264f24..07e9e73e 100644 --- a/gui/dialogs/VersionSelectDialog.ui +++ b/gui/dialogs/VersionSelectDialog.ui @@ -15,7 +15,7 @@ - + Qt::ScrollBarAlwaysOff @@ -65,6 +65,13 @@ + + + VersionListView + QTreeView +
gui/widgets/VersionListView.h
+
+
-- cgit