diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-01-05 15:56:04 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-01-05 15:56:04 +0000 |
commit | b7d8b0664b71a17285ec2060e8a46dc4ff5eef77 (patch) | |
tree | e3359bd82d51b54a9dce8190dfea8328cff4245b /Source | |
parent | 642f8dfd413d4e6bf68a4c11931d745f7f46655d (diff) | |
download | sequelpro-b7d8b0664b71a17285ec2060e8a46dc4ff5eef77.tar.gz sequelpro-b7d8b0664b71a17285ec2060e8a46dc4ff5eef77.tar.bz2 sequelpro-b7d8b0664b71a17285ec2060e8a46dc4ff5eef77.zip |
• first trial to improve the search field behaviour for Query Favorites and Query History popup menus
- the keys ↑ or ↓ inside an activated search field abort the current text field editor to allow to navigate through the result menu items by using the keyboard
- up to now one has to press ↑ or ↓ twice to select
- still work in progress
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CustomQuery.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 48de864f..2fec7d2f 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -3018,6 +3018,22 @@ } /** + * Abort editing of the Favorite and History search field editors if user presses ARROW UP or DOWN + * to allow to navigate through the menu item list. + */ +- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector +{ + if(control == queryHistorySearchField || control == queryFavoritesSearchField) { + if(commandSelector == @selector(moveDown:) || commandSelector == @selector(moveUp:)) { + [queryHistorySearchField abortEditing]; + [queryFavoritesSearchField abortEditing]; + return YES; + } + } + return NO; +} + +/** * Setup various interface controls. */ - (void)awakeFromNib |