summaryrefslogtreecommitdiffstats
path: root/gui/consolewindow.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-22 18:25:10 +0100
committerSky <git@bunnies.cc>2013-10-22 18:25:10 +0100
commitc65bab6efec27d7b0654609798f77dd617d33d2d (patch)
tree70a7cd21909ed15717f612ab69a14dd5a0541d7f /gui/consolewindow.cpp
parent1d2183ea29a0a5d65348700d4e043dbdb22b3632 (diff)
downloadMultiMC-c65bab6efec27d7b0654609798f77dd617d33d2d.tar
MultiMC-c65bab6efec27d7b0654609798f77dd617d33d2d.tar.gz
MultiMC-c65bab6efec27d7b0654609798f77dd617d33d2d.tar.lz
MultiMC-c65bab6efec27d7b0654609798f77dd617d33d2d.tar.xz
MultiMC-c65bab6efec27d7b0654609798f77dd617d33d2d.zip
Respect console options (opening a console at all, automatically closing)
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();
+ }
}