summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-17 10:27:36 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-17 10:27:36 (GMT)
commit9a960adf955b2af95ecd34b81b7a29c0ee9e5aa7 (patch)
tree4f719c572c713c30f6290242498dee8e6d9097d4 /SwifTools/Notifier/GrowlNotifier.cpp
parent49cf3d398309c933460e2be2de31c9b2217d9ab8 (diff)
downloadswift-9a960adf955b2af95ecd34b81b7a29c0ee9e5aa7.zip
swift-9a960adf955b2af95ecd34b81b7a29c0ee9e5aa7.tar.bz2
By default, only show message notifications.
Diffstat (limited to 'SwifTools/Notifier/GrowlNotifier.cpp')
-rw-r--r--SwifTools/Notifier/GrowlNotifier.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/SwifTools/Notifier/GrowlNotifier.cpp b/SwifTools/Notifier/GrowlNotifier.cpp
index 0660910..3eb580a 100644
--- a/SwifTools/Notifier/GrowlNotifier.cpp
+++ b/SwifTools/Notifier/GrowlNotifier.cpp
@@ -10,6 +10,7 @@
#include "Swiften/Base/ByteArray.h"
#include "SwifTools/Notifier/GrowlNotifier.h"
+#include "Swiften/Base/foreach.h"
#pragma GCC diagnostic ignored "-Wold-style-cast"
@@ -48,17 +49,15 @@ namespace Swift {
GrowlNotifier::GrowlNotifier(const String& name) {
// All notifications
CFMutableArrayRef allNotifications = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
- CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(ContactAvailable)));
- 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)));
+ foreach(Type type, getAllTypes()) {
+ CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(type)));
+ }
// 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)));
+ foreach(Type type, getDefaultTypes()) {
+ CFArrayAppendValue(allNotifications, SWIFTEN_STRING_TO_CFSTRING(typeToString(type)));
+ }
// Initialize delegate
InitGrowlDelegate(&delegate_);