diff options
Diffstat (limited to 'Source/SPGrowlController.m')
-rw-r--r-- | Source/SPGrowlController.m | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/SPGrowlController.m b/Source/SPGrowlController.m index be659041..816196bf 100644 --- a/Source/SPGrowlController.m +++ b/Source/SPGrowlController.m @@ -31,6 +31,7 @@ #import "SPGrowlController.h" #import "SPDatabaseDocument.h" #import "SPWindowController.h" +#import "SPAppController.h" #include <mach/mach_time.h> @@ -167,16 +168,14 @@ 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 [SPAppDelegate orderedDatabaseConnectionWindows]) { - if ([[eachWindow windowController] isKindOfClass:[SPWindowController class]]) { - for (SPDatabaseDocument *eachDocument in [[eachWindow windowController] documents]) - { - if ([eachDocument hash] == documentHash) { - [NSApp activateIgnoringOtherApps:YES]; - [eachDocument makeKeyDocument]; - return; - } + for (SPDatabaseDocument *eachDocument in [[eachWindow windowController] documents]) + { + if ([eachDocument hash] == documentHash) { + [NSApp activateIgnoringOtherApps:YES]; + [eachDocument makeKeyDocument]; + return; } } } |