summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-15 20:42:17 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-15 20:42:17 +0100
commitb0e8037feb5b9d48defe6b8263d068f87bdb141c (patch)
tree5610f78a1157aab6c7b81b321b9f347b15074b3c
parentdd9e04000ccd02a868138de9276f8fb93b855550 (diff)
downloadMultiMC-b0e8037feb5b9d48defe6b8263d068f87bdb141c.tar
MultiMC-b0e8037feb5b9d48defe6b8263d068f87bdb141c.tar.gz
MultiMC-b0e8037feb5b9d48defe6b8263d068f87bdb141c.tar.lz
MultiMC-b0e8037feb5b9d48defe6b8263d068f87bdb141c.tar.xz
MultiMC-b0e8037feb5b9d48defe6b8263d068f87bdb141c.zip
Make updates prevented by missing accounts verbose
-rw-r--r--gui/MainWindow.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index c4b0ceab..d91fc862 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -529,21 +529,21 @@ void MainWindow::on_actionAddInstance_triggered()
{
errorMsg += "An instance with the given directory name already exists.";
CustomMessageBox::selectable(this, tr("Error"), errorMsg, QMessageBox::Warning)->show();
- break;
+ return;
}
case InstanceFactory::CantCreateDir:
{
errorMsg += "Failed to create the instance directory.";
CustomMessageBox::selectable(this, tr("Error"), errorMsg, QMessageBox::Warning)->show();
- break;
+ return;
}
default:
{
errorMsg += QString("Unknown instance loader error %1").arg(error);
CustomMessageBox::selectable(this, tr("Error"), errorMsg, QMessageBox::Warning)->show();
- break;
+ return;
}
}
@@ -559,6 +559,14 @@ void MainWindow::on_actionAddInstance_triggered()
});
loadDialog.exec(update.get());
}
+ else
+ {
+ CustomMessageBox::selectable(
+ this, tr("Error"),
+ tr("MultiMC cannot download Minecraft or update instances unless you have at least "
+ "one account added.\nPlease add your Mojang or Minecraft account."),
+ QMessageBox::Warning)->show();
+ }
}
void MainWindow::on_actionCopyInstance_triggered()
@@ -634,7 +642,7 @@ void MainWindow::on_actionChangeInstGroup_triggered()
bool ok = false;
QString name(m_selectedInstance->group());
auto groups = MMC->instances()->getGroups();
- groups.insert(0,"");
+ groups.insert(0, "");
groups.sort(Qt::CaseInsensitive);
int foo = groups.indexOf(name);
@@ -1011,7 +1019,14 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
}
if (!MMC->accounts()->anyAccountIsValid())
+ {
+ CustomMessageBox::selectable(
+ this, tr("Error"),
+ tr("MultiMC cannot download Minecraft or update instances unless you have at least "
+ "one account added.\nPlease add your Mojang or Minecraft account."),
+ QMessageBox::Warning)->show();
return;
+ }
auto updateTask = m_selectedInstance->doUpdate(false /*only_prepare*/);
if (!updateTask)
{