Pass the desktop file in a shell-independent way.
authorAurelien Gateau <aurelien.gateau@canonical.com>
Wed, 16 Sep 2009 14:41:19 +0000 (16:41 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 16 Sep 2009 21:45:27 +0000 (23:45 +0200)
(Hopefully)

CMakeLists.txt
src/qtui/indicatornotificationbackend.cpp

index f44c02e..c8d803e 100644 (file)
@@ -296,7 +296,7 @@ if(INDICATEQT_FOUND)
   if(WANT_MONO)
     set(DESKTOP_FILE ${XDG_APPS_INSTALL_DIR}/quassel.desktop)
   endif(WANT_MONO)
   if(WANT_MONO)
     set(DESKTOP_FILE ${XDG_APPS_INSTALL_DIR}/quassel.desktop)
   endif(WANT_MONO)
-  add_definitions(-DDESKTOP_FILE="\\"${DESKTOP_FILE}\\"")
+  add_definitions(-DDESKTOP_FILE=${DESKTOP_FILE})
 endif(INDICATEQT_FOUND)
 
 # We need to create a version.gen
 endif(INDICATEQT_FOUND)
 
 # We need to create a version.gen
index 26d3a4f..6db9042 100644 (file)
@@ -29,6 +29,9 @@
 #include "networkmodel.h"
 #include "qtui.h"
 
 #include "networkmodel.h"
 #include "qtui.h"
 
+#define STR(x) #x
+#define XSTR(x) STR(x)
+
 class Indicator : public QIndicate::Indicator {
 public:
   uint lastNotificationId;
 class Indicator : public QIndicate::Indicator {
 public:
   uint lastNotificationId;
@@ -44,7 +47,7 @@ IndicatorNotificationBackend::IndicatorNotificationBackend(QObject *parent)
 
   _server = QIndicate::Server::defaultInstance();
   _server->setType("messaging");
 
   _server = QIndicate::Server::defaultInstance();
   _server->setType("messaging");
-  _server->setDesktopFile(DESKTOP_FILE);
+  _server->setDesktopFile(XSTR(DESKTOP_FILE));
   connect(_server, SIGNAL(serverDisplay()), QtUi::mainWindow(), SLOT(forceActivated()));
 
   if (_enabled) {
   connect(_server, SIGNAL(serverDisplay()), QtUi::mainWindow(), SLOT(forceActivated()));
 
   if (_enabled) {