diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-08 19:40:17 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-08 19:40:17 +0000 |
commit | e819de7f2889a25d3bc7c569b3fdee2f1551c61a (patch) | |
tree | b59c43643d0c7f3ca00fbfb3433c284d98d213ee /Source/TableContent.m | |
parent | 4c3fd409773ae47697cf685b6b18a6570ff127d6 (diff) | |
download | sequelpro-e819de7f2889a25d3bc7c569b3fdee2f1551c61a.tar.gz sequelpro-e819de7f2889a25d3bc7c569b3fdee2f1551c61a.tar.bz2 sequelpro-e819de7f2889a25d3bc7c569b3fdee2f1551c61a.zip |
• Select Content Filter ^⌘F
- select first textfield for 1 or 2 argument(s); if no argument field is selectable select compareField
- ensure the focus setting by calling "makeContentFilterHaveFocus" via performSelector:afterDelay
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r-- | Source/TableContent.m | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index bc040223..f41df80a 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -3219,7 +3219,7 @@ } // Duplicate row - if ([menuItem action] == @selector(copyRow:)) { + if ([menuItem action] == @selector(copyRow:)) { return ([tableContentView numberOfSelectedRows] == 1); } @@ -3231,7 +3231,22 @@ */ - (void)makeContentFilterHaveFocus { - [tableWindow makeFirstResponder:argumentField]; + + NSDictionary *filter = [[contentFilters objectForKey:compareType] objectAtIndex:[[compareField selectedItem] tag]]; + + if([filter objectForKey:@"NumberOfArguments"]) { + NSUInteger numOfArgs = [[filter objectForKey:@"NumberOfArguments"] integerValue]; + switch(numOfArgs) { + case 2: + [tableWindow makeFirstResponder:firstBetweenField]; + break; + case 1: + [tableWindow makeFirstResponder:argumentField]; + break; + default: + [tableWindow makeFirstResponder:compareField]; + } + } } #pragma mark - |