fix whitespace/indentatrion issues

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37647 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-01-30 14:58:20 +00:00
parent 28cac03e05
commit 5a5946dfce
2 changed files with 108 additions and 98 deletions

View file

@ -126,9 +126,12 @@ GS_EXPORT NSString * const NSUserNotificationDefaultSoundName;
@interface NSObject (NSUserNotificationCenterDelegateMethods) @interface NSObject (NSUserNotificationCenterDelegateMethods)
#endif #endif
- (void) userNotificationCenter: (NSUserNotificationCenter *)center didDeliverNotification: (NSUserNotification *)notification; - (void) userNotificationCenter: (NSUserNotificationCenter *)center
- (void) userNotificationCenter: (NSUserNotificationCenter *)center didActivateNotification: (NSUserNotification *)notification; didDeliverNotification: (NSUserNotification *)notification;
- (BOOL) userNotificationCenter: (NSUserNotificationCenter *)center shouldPresentNotification: (NSUserNotification *)notification; - (void) userNotificationCenter: (NSUserNotificationCenter *)center
didActivateNotification: (NSUserNotification *)notification;
- (BOOL) userNotificationCenter: (NSUserNotificationCenter *)center
shouldPresentNotification: (NSUserNotification *)notification;
@end @end

View file

@ -46,8 +46,7 @@
- (id) init - (id) init
{ {
self = [super init]; if (nil != (self = [super init]))
if (self)
{ {
self.hasActionButton = YES; self.hasActionButton = YES;
} }
@ -101,8 +100,10 @@ static NSUserNotificationCenter *defaultUserNotificationCenter = nil;
{ {
bundle = [NSBundle bundleWithPath: bundlePath]; bundle = [NSBundle bundleWithPath: bundlePath];
if (bundle) if (bundle)
{
return [bundle principalClass]; return [bundle principalClass];
} }
}
return self; return self;
} }
@ -134,8 +135,7 @@ static NSUserNotificationCenter *defaultUserNotificationCenter = nil;
- (id) init - (id) init
{ {
self = [super init]; if (nil != (self = self = [super init]))
if (self)
{ {
_scheduledNotifications = [[NSMutableArray alloc] init]; _scheduledNotifications = [[NSMutableArray alloc] init];
_deliveredNotifications = [[NSMutableArray alloc] init]; _deliveredNotifications = [[NSMutableArray alloc] init];
@ -191,8 +191,11 @@ static NSUserNotificationCenter *defaultUserNotificationCenter = nil;
[_deliveredNotifications addObject: un]; [_deliveredNotifications addObject: un];
un.presented = YES; un.presented = YES;
if (self.delegate && [self.delegate respondsToSelector: @selector(userNotificationCenter:didDeliverNotification:)]) if (self.delegate && [self.delegate respondsToSelector:
@selector(userNotificationCenter:didDeliverNotification:)])
{
[self.delegate userNotificationCenter: self didDeliverNotification: un]; [self.delegate userNotificationCenter: self didDeliverNotification: un];
}
} }
- (void) _removeDeliveredNotification: (NSUserNotification *)un - (void) _removeDeliveredNotification: (NSUserNotification *)un
@ -208,6 +211,7 @@ static NSUserNotificationCenter *defaultUserNotificationCenter = nil;
- (void) removeAllDeliveredNotifications - (void) removeAllDeliveredNotifications
{ {
NSUInteger i, count = [_deliveredNotifications count]; NSUInteger i, count = [_deliveredNotifications count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
NSUserNotification *un = [_deliveredNotifications objectAtIndex: i]; NSUserNotification *un = [_deliveredNotifications objectAtIndex: i];
@ -219,12 +223,15 @@ static NSUserNotificationCenter *defaultUserNotificationCenter = nil;
- (NSUserNotification *) deliveredNotificationWithUniqueId: (id)uniqueId - (NSUserNotification *) deliveredNotificationWithUniqueId: (id)uniqueId
{ {
NSUInteger i, count = [_deliveredNotifications count]; NSUInteger i, count = [_deliveredNotifications count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
NSUserNotification *un = [_deliveredNotifications objectAtIndex: i]; NSUserNotification *un = [_deliveredNotifications objectAtIndex: i];
if ([un->_uniqueId isEqual: uniqueId]) if ([un->_uniqueId isEqual: uniqueId])
{
return un; return un;
} }
}
return nil; return nil;
} }