From 7901af25949d9f164824d47d4ed5c4265694c979 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 2 Apr 2009 19:15:21 +0000 Subject: Change the toggle console menu item's title to either 'Show' or 'Hide' console. --- Interfaces/English.lproj/MainMenu.xib | 57 ++++++++++++++++++++++++++--------- Source/TableDocument.m | 9 +++++- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib index eb99ca16..ff105c0d 100644 --- a/Interfaces/English.lproj/MainMenu.xib +++ b/Interfaces/English.lproj/MainMenu.xib @@ -1,20 +1,28 @@ - + 1050 9G55 - 672 + 677 949.43 353.00 YES - - + YES com.apple.InterfaceBuilder.CocoaPlugin + + YES + + YES + + + YES + + YES @@ -765,7 +773,7 @@ - Toggle Console + Show Console K 1048576 2147483647 @@ -1374,7 +1382,7 @@ {3.40282e+38, 3.40282e+38} {213, 107} - + 256 YES @@ -1716,7 +1724,6 @@ {{1, 17}, {425, 182}} - 4 @@ -1750,7 +1757,6 @@ {{1, 0}, {425, 17}} - 4 @@ -1759,7 +1765,6 @@ {{263, 40}, {427, 200}} - 562 @@ -2434,7 +2439,6 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {710, 282} - {{0, 0}, {1920, 1178}} {213, 129} @@ -6878,7 +6882,7 @@ Y2hhbmdlIHRoZSBvcmRlcg com.apple.InterfaceBuilder.CocoaPlugin - {{243, 201}, {235, 183}} + {{420, 421}, {235, 183}} com.apple.InterfaceBuilder.CocoaPlugin {{698, 703}, {184, 133}} @@ -7444,17 +7448,42 @@ Y2hhbmdlIHRoZSBvcmRlcg YES clearConsole: + copy: saveConsoleAs: + toggleShowSelectShowStatements: + toggleShowTimeStamps: YES id id + id + id + id - consoleTextView - NSTextView + YES + + YES + clearConsoleButton + consoleSearchField + consoleTableView + includeTimeStampsButton + progressIndicator + saveConsoleButton + saveLogView + + + YES + NSButton + NSSearchField + NSTableView + NSButton + NSProgressIndicator + NSButton + NSView + IBProjectSource @@ -7558,7 +7587,6 @@ Y2hhbmdlIHRoZSBvcmRlcg keyChainInstance passwordField portField - queryConsoleInstance queryProgressBar sidebarGrabber socketField @@ -7607,7 +7635,6 @@ Y2hhbmdlIHRoZSBvcmRlcg id id id - id NSTabView id id 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")]; + } } /** -- cgit v1.2.3