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)
#endif
- (void) userNotificationCenter: (NSUserNotificationCenter *)center didDeliverNotification: (NSUserNotification *)notification;
- (void) userNotificationCenter: (NSUserNotificationCenter *)center didActivateNotification: (NSUserNotification *)notification;
- (BOOL) userNotificationCenter: (NSUserNotificationCenter *)center shouldPresentNotification: (NSUserNotification *)notification;
- (void) userNotificationCenter: (NSUserNotificationCenter *)center
didDeliverNotification: (NSUserNotification *)notification;
- (void) userNotificationCenter: (NSUserNotificationCenter *)center
didActivateNotification: (NSUserNotification *)notification;
- (BOOL) userNotificationCenter: (NSUserNotificationCenter *)center
shouldPresentNotification: (NSUserNotification *)notification;
@end

View file

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