From 256b06622980461740af4774206ca77e534acd21 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 8 Mar 2010 14:45:27 +0000 Subject: 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. --- Source/TableDocument.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source/TableDocument.m') 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]; } -- cgit v1.2.3