aboutsummaryrefslogtreecommitdiff
path: root/gui/consolewindow.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-26 11:13:14 +0100
committerSky <git@bunnies.cc>2013-10-26 11:13:14 +0100
commit1f28a3b8af228ec40412571859f15ea216ccb52a (patch)
tree975225cfc5981d9f8e5b79ba224db02782aa4faf /gui/consolewindow.cpp
parentcf07b90bdaf7dda2cbdd8ae9a7212c04badd0b09 (diff)
parentc467ebf1327d6266fc51443edfac6f0b536b6602 (diff)
downloadPrismLauncher-1f28a3b8af228ec40412571859f15ea216ccb52a.tar.gz
PrismLauncher-1f28a3b8af228ec40412571859f15ea216ccb52a.tar.bz2
PrismLauncher-1f28a3b8af228ec40412571859f15ea216ccb52a.zip
Merge branch 'develop'
Diffstat (limited to 'gui/consolewindow.cpp')
-rw-r--r--gui/consolewindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gui/consolewindow.cpp b/gui/consolewindow.cpp
index deeedd65..6ed4a0ec 100644
--- a/gui/consolewindow.cpp
+++ b/gui/consolewindow.cpp
@@ -14,7 +14,7 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) :
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
- connect(mcproc, SIGNAL(ended()), this, SLOT(onEnded()));
+ connect(mcproc, SIGNAL(ended(BaseInstance*)), this, SLOT(onEnded(BaseInstance*)));
}
ConsoleWindow::~ConsoleWindow()
@@ -109,9 +109,14 @@ void ConsoleWindow::on_btnKillMinecraft_clicked()
r_u_sure.close();
}
-void ConsoleWindow::onEnded()
+void ConsoleWindow::onEnded(BaseInstance *instance)
{
ui->btnKillMinecraft->setEnabled(false);
- // TODO: Check why this doesn't work
- if (!proc->exitCode()) this->close();
+
+ // TODO: Might need an option to forcefully close, even on an error
+ if(instance->settings().get("AutoCloseConsole").toBool())
+ {
+ // TODO: Check why this doesn't work
+ if (!proc->exitCode()) this->close();
+ }
}