From 6a2e8e164af23468525a507a69114ae386b2f451 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 15 Jan 2012 16:24:51 +0000 Subject: - Fix connection Growl notifications for background tabs to show the correct server name --- Source/SPDatabaseDocument.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source') 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"]; -- cgit v1.2.3