From 12bbd47239201bf2c17037a141a25bed0a2f3965 Mon Sep 17 00:00:00 2001 From: tux3 Date: Mon, 11 May 2015 23:01:25 +0200 Subject: [PATCH] Fix #928 If the status button is disabled, then we stay consistent by disallowing the desktop GUI's status setting actions, which are used by the tray icon. --- src/widget/widget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 8ef8059b1..63b891061 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1214,16 +1214,25 @@ void Widget::onTryCreateTrayIcon() void Widget::setStatusOnline() { + if (!ui->statusButton->isEnabled()) + return; + Nexus::getCore()->setStatus(Status::Online); } void Widget::setStatusAway() { + if (!ui->statusButton->isEnabled()) + return; + Nexus::getCore()->setStatus(Status::Away); } void Widget::setStatusBusy() { + if (!ui->statusButton->isEnabled()) + return; + Nexus::getCore()->setStatus(Status::Busy); }