aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-08 19:40:17 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-08 19:40:17 +0000
commite819de7f2889a25d3bc7c569b3fdee2f1551c61a (patch)
treeb59c43643d0c7f3ca00fbfb3433c284d98d213ee
parent4c3fd409773ae47697cf685b6b18a6570ff127d6 (diff)
downloadsequelpro-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
-rw-r--r--Source/TableContent.m19
-rw-r--r--Source/TableDocument.m2
2 files changed, 18 insertions, 3 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 -
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 69fe4a0c..e72f0b86 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2337,7 +2337,7 @@
{
[self viewContent:self];
- [tableContentInstance makeContentFilterHaveFocus];
+ [tableContentInstance performSelector:@selector(makeContentFilterHaveFocus) withObject:nil afterDelay:0.1];
}
#pragma mark -