summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Notifier')
-rw-r--r--SwifTools/Notifier/NotificationCenterNotifier.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/SwifTools/Notifier/NotificationCenterNotifier.mm b/SwifTools/Notifier/NotificationCenterNotifier.mm
index df092ff..28cacb6 100644
--- a/SwifTools/Notifier/NotificationCenterNotifier.mm
+++ b/SwifTools/Notifier/NotificationCenterNotifier.mm
@@ -53,6 +53,11 @@ NotificationCenterNotifier::~NotificationCenterNotifier() {
}
void NotificationCenterNotifier::showMessage(Type type, const std::string& subject, const std::string& description, const boost::filesystem::path& picture, boost::function<void ()> callback) {
+ std::vector<Notifier::Type> defaultTypes = getDefaultTypes();
+ if (std::find(defaultTypes.begin(), defaultTypes.end(), type) == defaultTypes.end()) {
+ return;
+ }
+
NSUserNotification* notification = [[NSUserNotification alloc] init];
notification.title = STD2NSSTRING(typeToString(type));
notification.subtitle = STD2NSSTRING(subject);