summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp29
1 files changed, 3 insertions, 26 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 842014d3..fc1b631c 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -712,27 +712,10 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
if (!proc)
return;
- // Prepare GUI: If it shall stay open disable the required parts
- if (MMC->settings()->get("NoHide").toBool())
- {
- ui->actionLaunchInstance->setEnabled(false);
- }
- else
- {
- this->hide();
- }
+ this->hide();
console = new ConsoleWindow(proc);
-
- connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console,
- SLOT(write(QString, MessageLevel::Enum)));
- connect(proc, SIGNAL(ended(BaseInstance*,int,QProcess::ExitStatus)), this,
- SLOT(instanceEnded(BaseInstance*,int,QProcess::ExitStatus)));
-
- if (instance->settings().get("ShowConsole").toBool())
- {
- console->show();
- }
+ connect(console, SIGNAL(isClosing()), this, SLOT(instanceEnded()));
proc->setLogin(response.username, response.session_id);
proc->launch();
@@ -884,15 +867,9 @@ void MainWindow::on_actionEditInstNotes_triggered()
}
}
-void MainWindow::instanceEnded(BaseInstance *instance, int code, QProcess::ExitStatus status)
+void MainWindow::instanceEnded()
{
this->show();
- ui->actionLaunchInstance->setEnabled(m_selectedInstance);
-
- if (instance->settings().get("AutoCloseConsole").toBool())
- {
- console->close();
- }
}
void MainWindow::checkSetDefaultJava()