diff options
author | stuconnolly <stuart02@gmail.com> | 2009-04-02 19:15:21 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-04-02 19:15:21 +0000 |
commit | 7901af25949d9f164824d47d4ed5c4265694c979 (patch) | |
tree | 1b358daa8c993dd608e4fe1bc70dabfbb0736d4e /Source | |
parent | 712a7b853e8d3a107c75678da47de68b0b1ecd96 (diff) | |
download | sequelpro-7901af25949d9f164824d47d4ed5c4265694c979.tar.gz sequelpro-7901af25949d9f164824d47d4ed5c4265694c979.tar.bz2 sequelpro-7901af25949d9f164824d47d4ed5c4265694c979.zip |
Change the toggle console menu item's title to either 'Show' or 'Hide' console.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 7585ed34..cd83f007 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -607,7 +607,14 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa */ - (void)toggleConsole:(id)sender { - [[[SPQueryConsole sharedQueryConsole] window] setIsVisible:![[[SPQueryConsole sharedQueryConsole] window] isVisible]]; + BOOL isConsoleVisible = [[[SPQueryConsole sharedQueryConsole] window] isVisible]; + + [[[SPQueryConsole sharedQueryConsole] window] setIsVisible:(!isConsoleVisible)]; + + // Only update the menu item title if its the menu item and not the toolbar + if ([sender isKindOfClass:[NSMenuItem class]]) { + [(NSMenuItem *)sender setTitle:(!isConsoleVisible) ? NSLocalizedString(@"Hide Console", @"Hide Console") : NSLocalizedString(@"Show Console", @"Show Console")]; + } } /** |