Ensure desktop file is found when using quasselclient
[quassel.git] / src / qtui / indicatornotificationbackend.cpp
index 6db9042..41fce5c 100644 (file)
@@ -41,13 +41,16 @@ 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));
+  _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()), QtUi::mainWindow(), SLOT(forceActivated()));
 
   if (_enabled) {