From 76c0ff7dee7b306a2e4e0e6af87ca02f07d0295b Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 18 Mar 2010 09:09:40 +0000 Subject: =?UTF-8?q?=E2=80=A2=20some=20progress=20of=20the=20navigator=20ap?= =?UTF-8?q?proach=20(not=20yet=20active=20-=20hidden=20main=20menu=20item)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'Source/TableDocument.m') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 3a7fd59b..62823c36 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -1131,7 +1131,7 @@ } else { [[[SPQueryController sharedQueryController] window] makeKeyAndOrderFront:self]; } - // [self showNavigator:self]; + } /** @@ -1156,7 +1156,7 @@ /** * Shows or hides the navigator */ -- (void)toggleNavigator:(id)sender +- (IBAction)toggleNavigator:(id)sender { BOOL isNavigatorVisible = [[[SPNavigatorController sharedNavigatorController] window] isVisible]; @@ -1170,7 +1170,7 @@ [[[SPNavigatorController sharedNavigatorController] window] setIsVisible:(!isNavigatorVisible)]; } -- (void)showNavigator:(id)sender +- (IBAction)showNavigator:(id)sender { BOOL isNavigatorVisible = [[[SPNavigatorController sharedNavigatorController] window] isVisible]; @@ -2426,6 +2426,16 @@ return theUser; } +/** + * Returns the current host's port + */ +- (NSString *)port +{ + NSString *thePort = [connectionController port]; + if (!thePort) return @""; + return thePort; +} + - (NSString *)keyChainID { return keyChainID; @@ -3076,6 +3086,11 @@ return ([[SPQueryController sharedQueryController] consoleMessageCount] > 0); } + // Show/hide console + if ([menuItem action] == @selector(toggleNavigator:)) { + [menuItem setTitle:([[[SPNavigatorController sharedNavigatorController] window] isVisible]) ? NSLocalizedString(@"Hide Navigator", @"hide navigator") : NSLocalizedString(@"Show Navigator", @"show navigator")]; + } + // Focus on table content filter if ([menuItem action] == @selector(focusOnTableContentFilter:)) { return ([self table] != nil && [[self table] isNotEqualTo:@""]); -- cgit v1.2.3