aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDocument.m10
-rw-r--r--Source/TablesList.m10
2 files changed, 17 insertions, 3 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];
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 76e653be..6ef3d315 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -1609,7 +1609,15 @@
*/
- (void) makeTableListFilterHaveFocus
{
- [tableWindow makeFirstResponder:listFilterField];
+ if([tables count] > 20) {
+ [tableWindow makeFirstResponder:listFilterField];
+ }
+ else if([tables count] > 2) {
+ [tableWindow makeFirstResponder:tablesListView];
+ if([tablesListView numberOfSelectedRows] < 1)
+ [tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
+
+ }
}
/**