summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/ConsoleWindow.cpp3
-rw-r--r--gui/MainWindow.cpp15
-rw-r--r--logic/OneSixUpdate.cpp2
3 files changed, 18 insertions, 2 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp
index 5db4442e..1a0f352d 100644
--- a/gui/ConsoleWindow.cpp
+++ b/gui/ConsoleWindow.cpp
@@ -47,6 +47,7 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent)
{
show();
}
+ setMayClose(false);
}
ConsoleWindow::~ConsoleWindow()
@@ -174,6 +175,7 @@ void ConsoleWindow::onEnded(BaseInstance *instance, int code, QProcess::ExitStat
}
if(!isVisible())
show();
+ setMayClose(true);
}
void ConsoleWindow::onLaunchFailed(BaseInstance *instance)
@@ -181,6 +183,7 @@ void ConsoleWindow::onLaunchFailed(BaseInstance *instance)
ui->btnKillMinecraft->setEnabled(false);
if(!isVisible())
show();
+ setMayClose(true);
}
void ConsoleWindow::on_btnPaste_clicked()
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index f115f090..80bde381 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -513,7 +513,7 @@ void MainWindow::on_actionAddInstance_triggered()
newInstance->setName(newInstDlg.instName());
newInstance->setIconKey(newInstDlg.iconKey());
MMC->instances()->add(InstancePtr(newInstance));
- return;
+ break;
case InstanceFactory::InstExists:
{
@@ -536,6 +536,19 @@ void MainWindow::on_actionAddInstance_triggered()
break;
}
}
+
+ std::shared_ptr<MojangAccountList> accounts = MMC->accounts();
+ MojangAccountPtr account = accounts->activeAccount();
+ if(account.get() != nullptr && account->accountStatus() != NotVerified)
+ {
+ ProgressDialog loadDialog(this);
+ auto update = newInstance->doUpdate(false);
+ connect(update.get(), &Task::failed , [this](QString reason) {
+ QString error = QString("Instance load failed: %1").arg(reason);
+ CustomMessageBox::selectable(this, tr("Error"), error, QMessageBox::Warning)->show();
+ });
+ loadDialog.exec(update.get());
+ }
}
void MainWindow::on_actionCopyInstance_triggered()
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index b32e833c..39064de8 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -202,7 +202,7 @@ void OneSixUpdate::assetIndexStart()
OneSixInstance *inst = (OneSixInstance *)m_inst;
std::shared_ptr<OneSixVersion> version = inst->getFullVersion();
QString assetName = version->assets;
- QUrl indexUrl("https://s3.amazonaws.com/Minecraft.Download/indexes/" + assetName + ".json");
+ QUrl indexUrl("http://s3.amazonaws.com/Minecraft.Download/indexes/" + assetName + ".json");
QString localPath = assetName + ".json";
auto job = new NetJob("Asset index for " + inst->name());