summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp11
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());