aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-18 09:09:40 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-18 09:09:40 +0000
commit76c0ff7dee7b306a2e4e0e6af87ca02f07d0295b (patch)
treef58def0e9f72b9123cf2287be16a45255497445b /Source/TableDocument.m
parent48f80fe6342b14913ffbebf5449895ff9d5e9af8 (diff)
downloadsequelpro-76c0ff7dee7b306a2e4e0e6af87ca02f07d0295b.tar.gz
sequelpro-76c0ff7dee7b306a2e4e0e6af87ca02f07d0295b.tar.bz2
sequelpro-76c0ff7dee7b306a2e4e0e6af87ca02f07d0295b.zip
• some progress of the navigator approach (not yet active - hidden main menu item)
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:@""]);