X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Findicatornotificationbackend.cpp;h=df7b5340c0f6cc6ad6f81ad36ec32ff70abd9043;hb=cf721fb75a7525b03c0086f98314b828f5322001;hp=6db9042a7da97c3573d93a67829036ab359c284f;hpb=56a7e3bf58869c9cd28c384d6fe51927bea01fa5;p=quassel.git diff --git a/src/qtui/indicatornotificationbackend.cpp b/src/qtui/indicatornotificationbackend.cpp index 6db9042a..df7b5340 100644 --- a/src/qtui/indicatornotificationbackend.cpp +++ b/src/qtui/indicatornotificationbackend.cpp @@ -41,14 +41,17 @@ IndicatorNotificationBackend::IndicatorNotificationBackend(QObject *parent) : AbstractNotificationBackend(parent) { NotificationSettings notificationSettings; - _enabled = notificationSettings.value("Indicator/Enabled", true).toBool(); + _enabled = notificationSettings.value("Indicator/Enabled", false).toBool(); notificationSettings.notify("Indicator/Enabled", this, SLOT(enabledChanged(const QVariant &))); _server = QIndicate::Server::defaultInstance(); - _server->setType("messaging"); - _server->setDesktopFile(XSTR(DESKTOP_FILE)); - connect(_server, SIGNAL(serverDisplay()), QtUi::mainWindow(), SLOT(forceActivated())); + _server->setType("message.irc"); + QString desktopFile = QString("%1/%2.desktop") + .arg(XSTR(XDG_APPS_INSTALL_DIR)) + .arg(QCoreApplication::applicationFilePath().section('/', -1)); + _server->setDesktopFile(desktopFile); + connect(_server, SIGNAL(serverDisplay()), SLOT(activateMainWidget())); if (_enabled) { _server->show(); @@ -59,6 +62,10 @@ IndicatorNotificationBackend::~IndicatorNotificationBackend() { qDeleteAll(_indicatorHash); } +void IndicatorNotificationBackend::activateMainWidget() { + GraphicalUi::activateMainWidget(); +} + void IndicatorNotificationBackend::notify(const Notification ¬ification) { if(!_enabled) { return;