From 018271d3804ead3488e089898695f7f1d2cda812 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 27 Jun 2012 09:42:27 +0000 Subject: Tidy up an use enums. --- Source/SPGrowlController.m | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Source/SPGrowlController.m') diff --git a/Source/SPGrowlController.m b/Source/SPGrowlController.m index 7c352b9f..481bfdd1 100644 --- a/Source/SPGrowlController.m +++ b/Source/SPGrowlController.m @@ -33,6 +33,12 @@ static SPGrowlController *sharedGrowlController = nil; @class SPWindowController; +@interface SPGrowlController () + +- (double)milliTime; + +@end + @implementation SPGrowlController /** @@ -72,6 +78,8 @@ static SPGrowlController *sharedGrowlController = nil; return self; } +#pragma mark - + /** * Posts a Growl notification using the supplied details and default values. * Calls the notification after a tiny delay to allow isKeyWindow to have updated @@ -121,8 +129,8 @@ static SPGrowlController *sharedGrowlController = nil; // Don't post the notification if the notification document is frontmost // as that suggests the user is already viewing the notification result. - if ([[document parentWindow] isKeyWindow] - && [[[document parentTabViewItem] tabView] selectedTabViewItem] == [document parentTabViewItem]) + if ([[document parentWindow] isKeyWindow] && + [[[document parentTabViewItem] tabView] selectedTabViewItem] == [document parentTabViewItem]) { postNotification = NO; } @@ -159,9 +167,11 @@ static SPGrowlController *sharedGrowlController = nil; NSUInteger documentHash = [[clickContext objectForKey:@"notificationDocumentHash"] unsignedIntegerValue]; // Loop through the windows, looking for the document - for (NSWindow *eachWindow in [NSApp orderedWindows]) { + for (NSWindow *eachWindow in [NSApp orderedWindows]) + { if ([[eachWindow windowController] isKindOfClass:[SPWindowController class]]) { - for (SPDatabaseDocument *eachDocument in [[eachWindow windowController] documents]) { + for (SPDatabaseDocument *eachDocument in [[eachWindow windowController] documents]) + { if ([eachDocument hash] == documentHash) { [NSApp activateIgnoringOtherApps:YES]; [eachDocument makeKeyDocument]; -- cgit v1.2.3