aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-25 19:44:59 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-25 19:44:59 +0000
commitc6779c7de40f38c8ff7f8d8ffa7c649164921556 (patch)
tree0913f34b374d14d72a8b95c47e0f208fdb0c003d /Source/TableDocument.m
parent9163b4ff5779f2abc03855542448f5a01d5f23e4 (diff)
downloadsequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.tar.gz
sequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.tar.bz2
sequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.zip
• changed behaviour of ^⌥⌘F "Filter Table" or "Change Focus to Table List"
- if > 20 tables are listed it sets the focus on the search field - if <= 20 it sets the focus on the table list, and - if no selection - it selects the first table item - this fixes i597
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 0a68eda2..65cf9049 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -3137,9 +3137,15 @@
return ([self table] != nil && [[self table] isNotEqualTo:@""]);
}
- // Focus on table list filter
+ // Focus on table list or filter resp.
if ([menuItem action] == @selector(focusOnTableListFilter:)) {
- return ([[tablesListInstance valueForKeyPath:@"tables"] count] > 20);
+
+ if([[tablesListInstance valueForKeyPath:@"tables"] count] > 20)
+ [menuItem setTitle:NSLocalizedString(@"Filter Tables", @"filter tables menu item")];
+ else
+ [menuItem setTitle:NSLocalizedString(@"Change Focus to Table List", @"change focus to table list menu item")];
+
+ return ([[tablesListInstance valueForKeyPath:@"tables"] count] > 1);
}
return [super validateMenuItem:menuItem];