diff options
author | Tobias Markmann <tm@ayena.de> | 2012-09-08 14:15:31 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2012-09-09 10:35:57 (GMT) |
commit | 9d55b647520acc73742695517615f96165ecc8f5 (patch) | |
tree | beac966766e6835ade79881f2c13deb7fec1fb53 /Swift/QtUI/QtSwift.cpp | |
parent | 60b1599f5f3d11db2842ecb0bc05208225167b01 (diff) | |
download | swift-contrib-tobias/notification-center.zip swift-contrib-tobias/notification-center.tar.bz2 |
Initial version of ML's NotificationCenter support.tobias/notification-center
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 13b2175..c07c485 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -43,6 +43,9 @@ #include "WindowsNotifier.h" #elif defined(HAVE_GROWL) #include "SwifTools/Notifier/GrowlNotifier.h" +#if defined(HAVE_NOTIFICATION_CENTER) +#include "SwifTools/Notifier/NotificationCenterNotifier.h" +#endif #elif defined(SWIFTEN_PLATFORM_LINUX) #include "FreeDesktopNotifier.h" #else @@ -163,7 +166,13 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa QtSystemTray* systemTray = new QtSystemTray(); systemTrays_.push_back(systemTray); -#if defined(HAVE_GROWL) +#if defined(HAVE_NOTIFICATION_CENTER) && defined(HAVE_GROWL) + if (NotificationCenterNotifier::isSupported()) { + notifier_ = new NotificationCenterNotifier(SWIFT_APPLICATION_NAME); + } else { + notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME); + } +#elif defined(HAVE_GROWL) notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME); #elif defined(SWIFTEN_PLATFORM_WINDOWS) notifier_ = new WindowsNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"), systemTray->getQSystemTrayIcon()); |