aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m21
1 files changed, 18 insertions, 3 deletions
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:@""]);