From 434ecaa42e6d5563698e6464cd4ebc09c531158d Mon Sep 17 00:00:00 2001 From: masakih Date: Fri, 28 Mar 2014 20:50:12 +0900 Subject: [PATCH] =?utf8?q?NSUserNotification=E9=96=A2=E9=80=A3=E3=80=81?= =?utf8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88?= =?utf8?q?=E3=81=97=E3=81=A6=E6=8A=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KCD/HMAppDelegate.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/KCD/HMAppDelegate.m b/KCD/HMAppDelegate.m index c365648b..3ea9e689 100644 --- a/KCD/HMAppDelegate.m +++ b/KCD/HMAppDelegate.m @@ -18,6 +18,10 @@ #import "HMTSVSupport.h" #endif +//@interface NSObject (HMM_NSUserNotificationCenterPrivateMethods) +//- (void)_removeDisplayedNotification:(id)obj; +//@end + @interface HMAppDelegate () @property (strong) HMBroserWindowController *browserWindowController; @@ -129,11 +133,29 @@ static FILE* logFileP = NULL; } #pragma mark - NSUserNotificationCenterDelegate +//- (void)removeUserNotification:(NSDictionary *)dict +//{ +// NSUserNotificationCenter *center = [dict objectForKey:@"center"]; +// NSUserNotification *notification = [dict objectForKey:@"notification"]; +// [center removeDeliveredNotification:notification]; +// // [center _removeDisplayedNotification:notification]; +//} + - (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification { return YES; } +//- (void)userNotificationCenter:(NSUserNotificationCenter *)center didDeliverNotification:(NSUserNotification *)notification +//{ +// [self performSelector:@selector(removeUserNotification:) +// withObject:@{@"center":center, @"notification":notification} +// afterDelay:3]; +//} +//- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification +//{ +// [center removeDeliveredNotification:notification]; +//} #if ENABLE_JSON_LOG - (IBAction)saveDocument:(id)sender { -- 2.11.0