diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-09-03 16:01:14 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-09-03 16:20:31 (GMT) |
| commit | be6aa6e81b44be67518731d67bb2b72268d351e8 (patch) | |
| tree | eaa06c5bf303e627db91f869adba0611da393255 /Swift/QtUI/QtSwift.cpp | |
| parent | b6ffd5a332b6b21fdba9937fa3a0274556a09cdf (diff) | |
| download | swift-be6aa6e81b44be67518731d67bb2b72268d351e8.zip swift-be6aa6e81b44be67518731d67bb2b72268d351e8.tar.bz2 | |
Initial support for OS X Notification Center
This implements basic support for OS X Notification Center
notifications with simple banner notifications showing type,
contact and message/presence information. A click on the
notification opens the chat view to the contact.
The Notification Center backend will be used on OS X if the Growl
notification backend is not used.
This code requires OS X version 10.8 or later.
Test-Information:
Tested presence and message notifications between multiple Swift
accounts and instances on OS X 10.9.5.
Change-Id: I7b9e2132cab25e086e0912191562cad8f4cbae38
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
| -rw-r--r-- | Swift/QtUI/QtSwift.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 6d8ac7b..756f530 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp | |||
| @@ -54,10 +54,12 @@ | |||
| 54 | #include <Swift/QtUI/WindowsNotifier.h> | 54 | #include <Swift/QtUI/WindowsNotifier.h> |
| 55 | #elif defined(HAVE_GROWL) | 55 | #elif defined(HAVE_GROWL) |
| 56 | #include <SwifTools/Notifier/GrowlNotifier.h> | 56 | #include <SwifTools/Notifier/GrowlNotifier.h> |
| 57 | #elif defined(SWIFTEN_PLATFORM_LINUX) | 57 | #elif defined(SWIFTEN_PLATFORM_LINUX) |
| 58 | #include <Swift/QtUI/FreeDesktopNotifier.h> | 58 | #include <Swift/QtUI/FreeDesktopNotifier.h> |
| 59 | #elif defined(SWIFTEN_PLATFORM_MACOSX) | ||
| 60 | #include <SwifTools/Notifier/NotificationCenterNotifier.h> | ||
| 59 | #else | 61 | #else |
| 60 | #include <SwifTools/Notifier/NullNotifier.h> | 62 | #include <SwifTools/Notifier/NullNotifier.h> |
| 61 | #endif | 63 | #endif |
| 62 | 64 | ||
| 63 | #if defined(SWIFTEN_PLATFORM_MACOSX) | 65 | #if defined(SWIFTEN_PLATFORM_MACOSX) |
| @@ -194,10 +196,12 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa | |||
| 194 | notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME); | 196 | notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME); |
| 195 | #elif defined(SWIFTEN_PLATFORM_WINDOWS) | 197 | #elif defined(SWIFTEN_PLATFORM_WINDOWS) |
| 196 | notifier_ = new WindowsNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"), systemTray->getQSystemTrayIcon()); | 198 | notifier_ = new WindowsNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"), systemTray->getQSystemTrayIcon()); |
| 197 | #elif defined(SWIFTEN_PLATFORM_LINUX) | 199 | #elif defined(SWIFTEN_PLATFORM_LINUX) |
| 198 | notifier_ = new FreeDesktopNotifier(SWIFT_APPLICATION_NAME); | 200 | notifier_ = new FreeDesktopNotifier(SWIFT_APPLICATION_NAME); |
| 201 | #elif defined(SWIFTEN_PLATFORM_MACOSX) | ||
| 202 | notifier_ = new NotificationCenterNotifier(); | ||
| 199 | #else | 203 | #else |
| 200 | notifier_ = new NullNotifier(); | 204 | notifier_ = new NullNotifier(); |
| 201 | #endif | 205 | #endif |
| 202 | 206 | ||
| 203 | #if defined(SWIFTEN_PLATFORM_MACOSX) | 207 | #if defined(SWIFTEN_PLATFORM_MACOSX) |
Swift