aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPGrowlController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-06-27 09:42:27 +0000
committerstuconnolly <stuart02@gmail.com>2012-06-27 09:42:27 +0000
commit018271d3804ead3488e089898695f7f1d2cda812 (patch)
treefff8d7e86a5d5c7fab66ed15b4183adffbad2eee /Source/SPGrowlController.m
parente0be0f0668619e4fb70e23d8e25b2680f12b6a12 (diff)
downloadsequelpro-018271d3804ead3488e089898695f7f1d2cda812.tar.gz
sequelpro-018271d3804ead3488e089898695f7f1d2cda812.tar.bz2
sequelpro-018271d3804ead3488e089898695f7f1d2cda812.zip
Tidy up an use enums.
Diffstat (limited to 'Source/SPGrowlController.m')
-rw-r--r--Source/SPGrowlController.m18
1 files changed, 14 insertions, 4 deletions
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];