aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-03-08 14:45:27 +0000
committerstuconnolly <stuart02@gmail.com>2010-03-08 14:45:27 +0000
commit256b06622980461740af4774206ca77e534acd21 (patch)
treeb846e83d1a8dfc7f9a0882bdc950941b7714cece /Source/TableDocument.m
parent9a15311b23c074ce579cd55631c8f2b0e574fda0 (diff)
downloadsequelpro-256b06622980461740af4774206ca77e534acd21.tar.gz
sequelpro-256b06622980461740af4774206ca77e534acd21.tar.bz2
sequelpro-256b06622980461740af4774206ca77e534acd21.zip
Add a new 'Filter Content...' menu item to the 'Table' menu that switches to the content view and places the focus on the filter field.
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index c74264c4..69fe4a0c 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2330,6 +2330,16 @@
}
}
+/**
+ * Switches to the content view and makes the filter field the first responder (has focus).
+ */
+- (IBAction)focusOnTableContentFilter:(id)sender
+{
+ [self viewContent:self];
+
+ [tableContentInstance makeContentFilterHaveFocus];
+}
+
#pragma mark -
#pragma mark Other Methods
@@ -3171,6 +3181,11 @@
if ([menuItem action] == @selector(clearConsole:)) {
return ([[SPQueryController sharedQueryController] consoleMessageCount] > 0);
}
+
+ // Focus on table content filter
+ if ([menuItem action] == @selector(focusOnTableContentFilter:)) {
+ return ([self table] != nil && [[self table] isNotEqualTo:@""]);
+ }
return [super validateMenuItem:menuItem];
}