diff options
author | Tobias Markmann <tm@ayena.de> | 2012-09-08 14:15:31 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2012-09-09 10:35:57 (GMT) |
commit | 9d55b647520acc73742695517615f96165ecc8f5 (patch) | |
tree | beac966766e6835ade79881f2c13deb7fec1fb53 /SwifTools/Notifier/NotificationCenterNotifierDelegate.mm | |
parent | 60b1599f5f3d11db2842ecb0bc05208225167b01 (diff) | |
download | swift-contrib-tobias/notification-center.zip swift-contrib-tobias/notification-center.tar.bz2 |
Initial version of ML's NotificationCenter support.tobias/notification-center
Diffstat (limited to 'SwifTools/Notifier/NotificationCenterNotifierDelegate.mm')
-rw-r--r-- | SwifTools/Notifier/NotificationCenterNotifierDelegate.mm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm b/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm new file mode 100644 index 0000000..271d953 --- /dev/null +++ b/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2012 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#import "NotificationCenterNotifierDelegate.h" + +#include <SwifTools/Notifier/NotificationCenterNotifier.h> + +@implementation NotificationCenterNotifierDelegate; + +@synthesize notifier; + +using namespace Swift; + +- (void) userNotificationCenter:(NSUserNotificationCenter *) center didActivateNotification:(NSUserNotification *) notification { + notifier->handleNotificationClicked(notification); + //Remove the notification + [center removeDeliveredNotification:notification]; +} + +@end |