From f897a200e2607fd99116a3ab4bb9ba757a52139b Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Fri, 6 Sep 2013 22:40:50 +0200 Subject: Made instace killing actually work --- gui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 4ccc12b6..75996c5d 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -538,7 +538,7 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response) if(!proc) return; - console = new ConsoleWindow(); + console = new ConsoleWindow(proc); console->show(); connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console, SLOT(write(QString, MessageLevel::Enum))); -- cgit v1.2.3 From 0990a1103c7eafd099e3ef9650f542eb34a6a818 Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Fri, 6 Sep 2013 23:01:40 +0200 Subject: Made Offline user name default to 'Offline' if the textbox is left empty --- gui/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 75996c5d..7d1e1510 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -492,7 +492,10 @@ void MainWindow::doLogin(const QString& errorMsg) } else { - m_activeLogin = {loginDlg->getUsername(), QString("Offline"), qint64(-1)}; + QString user = loginDlg->getUsername(); + if (user.length() == 0) + user = QString("Offline"); + m_activeLogin = {user, QString("Offline"), qint64(-1)}; m_activeInst = m_selectedInstance; launchInstance(m_activeInst, m_activeLogin); } -- cgit v1.2.3 From 3fd2d025a1aa0bbc72ac69a34828ef5942255143 Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Fri, 6 Sep 2013 23:52:17 +0200 Subject: Made main window hide on instace exit --- gui/mainwindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 7d1e1510..82ae41d9 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -541,10 +541,21 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response) if(!proc) return; + // Prepare GUI: If it shall stay open disable the required parts + if (globalSettings->get("NoHide").toBool()) + { + ui->actionLaunchInstance->setEnabled(false); + } + else + { + this->hide(); + } + console = new ConsoleWindow(proc); console->show(); connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console, SLOT(write(QString, MessageLevel::Enum))); + connect(proc, SIGNAL(ended()), this, SLOT(instanceEnded())); proc->launch(); } @@ -673,3 +684,9 @@ void MainWindow::on_actionEditInstNotes_triggered() linst->setNotes(noteedit.getText()); } } + +void MainWindow::instanceEnded() +{ + this->show(); + ui->actionLaunchInstance->setEnabled(m_selectedInstance); +} -- cgit v1.2.3 From dab2bbe4e79cfd8b3b72b8d2fd0e5bd66e0281a9 Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Sun, 8 Sep 2013 15:02:52 +0200 Subject: Added console coloring and made the log not contain any usernames/session ids --- gui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'gui/mainwindow.cpp') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 82ae41d9..152773e7 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -556,6 +556,7 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response) connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console, SLOT(write(QString, MessageLevel::Enum))); connect(proc, SIGNAL(ended()), this, SLOT(instanceEnded())); + proc->setLogin(m_activeLogin.username, m_activeLogin.sessionID); proc->launch(); } -- cgit v1.2.3