summaryrefslogtreecommitdiffstats
path: root/src/client/toolbar/toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/toolbar/toolbar.cpp')
-rw-r--r--src/client/toolbar/toolbar.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 41798dd..4374161 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -111,6 +111,7 @@ void Toolbar::init()
connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention()));
connect(_ui->btnCustom, SIGNAL(toggled(bool)), this, SLOT(onBtnCustom()));
connect(&this->runDbg, SIGNAL(finished(int)), this, SLOT(onDbgFinished()));
+ connect(&this->runDbg, SIGNAL(started()), this, SLOT(onDbgStarted()));
/* Setup menu */
initMenu();
@@ -501,8 +502,6 @@ void Toolbar::onBtnCustom()
const bool on = _ui->btnCustom->isChecked();
if (on) {
this->runDbg.start("/bin/sh", QStringList() << "/opt/openslx/remotedebug/startdebug_noxterm.sh");
- _ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold");
- _ui->btnCustom->setText("Debug mode: ON");
} else {
this->runDbg.terminate();
}
@@ -512,11 +511,19 @@ void Toolbar::onBtnCustom()
void Toolbar::onDbgFinished()
{
- _ui->btnCustom->setChecked(false);
+ if (_ui->btnCustom->isChecked()) {
+ _ui->btnCustom->setChecked(false);
+ }
_ui->btnCustom->setStyleSheet("background-color: grey; color: black; font: bold");
_ui->btnCustom->setText("Debug mode: OFF");
}
+void Toolbar::onDbgStarted()
+{
+ _ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold");
+ _ui->btnCustom->setText("Debug mode: ON");
+}
+
void Toolbar::onBtnLockDesktop()
{
if (this->lockDesktopP.state() == QProcess::NotRunning) {