diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-15 08:46:11 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-15 08:46:11 (GMT) |
commit | be7e9559a3973122649f5d42c25149750314c902 (patch) | |
tree | 52da0a7864d67955b2e2eef0a49c32a1a8d357e4 /SwifTools | |
parent | 2b630292e8e26e07a77e350024ba45c625f8dd95 (diff) | |
download | swift-be7e9559a3973122649f5d42c25149750314c902.zip swift-be7e9559a3973122649f5d42c25149750314c902.tar.bz2 |
Added system message to notifier.
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/Notifier/GrowlNotifier.cpp | 4 | ||||
-rw-r--r-- | SwifTools/Notifier/Notifier.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/SwifTools/Notifier/GrowlNotifier.cpp b/SwifTools/Notifier/GrowlNotifier.cpp index 7ea7193..0527ef8 100644 --- a/SwifTools/Notifier/GrowlNotifier.cpp +++ b/SwifTools/Notifier/GrowlNotifier.cpp @@ -4,7 +4,6 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -// FIXME: Is it safe to pass boost::function<void()> by raw values? // FIXME: Should we release the strings created in the constructor? #include <cassert> @@ -53,11 +52,13 @@ GrowlNotifier::GrowlNotifier(const String& name) { CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(ContactUnavailable))); CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(ContactStatusChange))); CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(IncomingMessage))); + CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(SystemMessage))); // Default Notifications CFMutableArrayRef defaultNotifications = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); CFArrayAppendValue(defaultNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(ContactAvailable))); CFArrayAppendValue(defaultNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(IncomingMessage))); + CFArrayAppendValue(defaultNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(SystemMessage))); // Initialize delegate InitGrowlDelegate(&delegate_); @@ -97,6 +98,7 @@ String GrowlNotifier::typeToString(Type type) { case ContactUnavailable: return "Contact Becomes Unavailable"; case ContactStatusChange: return "Contact Changes Status"; case IncomingMessage: return "Incoming Message"; + case SystemMessage: return "System Message"; } assert(false); return ""; diff --git a/SwifTools/Notifier/Notifier.h b/SwifTools/Notifier/Notifier.h index 7eb09f4..3e3da8a 100644 --- a/SwifTools/Notifier/Notifier.h +++ b/SwifTools/Notifier/Notifier.h @@ -15,7 +15,7 @@ namespace Swift { public: virtual ~Notifier(); - enum Type { ContactAvailable, ContactUnavailable, ContactStatusChange, IncomingMessage }; + enum Type { ContactAvailable, ContactUnavailable, ContactStatusChange, IncomingMessage, SystemMessage }; /** * Picture is a PNG image. |