diff options
| -rw-r--r-- | SwifTools/Notifier/NotificationCenterNotifier.mm | 5 |
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() { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void NotificationCenterNotifier::showMessage(Type type, const std::string& subject, const std::string& description, const boost::filesystem::path& picture, boost::function<void ()> callback) { | 55 | void NotificationCenterNotifier::showMessage(Type type, const std::string& subject, const std::string& description, const boost::filesystem::path& picture, boost::function<void ()> callback) { |
| 56 | std::vector<Notifier::Type> defaultTypes = getDefaultTypes(); | ||
| 57 | if (std::find(defaultTypes.begin(), defaultTypes.end(), type) == defaultTypes.end()) { | ||
| 58 | return; | ||
| 59 | } | ||
| 60 | |||
| 56 | NSUserNotification* notification = [[NSUserNotification alloc] init]; | 61 | NSUserNotification* notification = [[NSUserNotification alloc] init]; |
| 57 | notification.title = STD2NSSTRING(typeToString(type)); | 62 | notification.title = STD2NSSTRING(typeToString(type)); |
| 58 | notification.subtitle = STD2NSSTRING(subject); | 63 | notification.subtitle = STD2NSSTRING(subject); |
Swift