diff options
author | rowanbeentje <rowan@beent.je> | 2012-01-15 16:24:51 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-01-15 16:24:51 +0000 |
commit | 6a2e8e164af23468525a507a69114ae386b2f451 (patch) | |
tree | 00746d101c802396ab7e900087a2e21942e738ea | |
parent | 55de01f18ced503be7f6c0fe2b997e347f2b6e78 (diff) | |
download | sequelpro-6a2e8e164af23468525a507a69114ae386b2f451.tar.gz sequelpro-6a2e8e164af23468525a507a69114ae386b2f451.tar.bz2 sequelpro-6a2e8e164af23468525a507a69114ae386b2f451.zip |
- Fix connection Growl notifications for background tabs to show the correct server name
-rw-r--r-- | Source/SPDatabaseDocument.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 2133cfcd..2e834dd9 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -478,8 +478,15 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [self updateWindowTitle:self]; // Connected Growl notification + NSString *serverDisplayName = nil; + if ([parentWindowController selectedTableDocument] == self) { + serverDisplayName = [parentWindow title]; + } else { + serverDisplayName = [parentTabViewItem label]; + } + [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Connected" - description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), [parentWindow title]] + description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), serverDisplayName] document:self notificationName:@"Connected"]; |