From b7d8b0664b71a17285ec2060e8a46dc4ff5eef77 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 5 Jan 2010 15:56:04 +0000 Subject: =?UTF-8?q?=E2=80=A2=20first=20trial=20to=20improve=20the=20search?= =?UTF-8?q?=20field=20behaviour=20for=20Query=20Favorites=20and=20Query=20?= =?UTF-8?q?History=20popup=20menus=20-=20the=20keys=20=E2=86=91=20or=20?= =?UTF-8?q?=E2=86=93=20inside=20an=20activated=20search=20field=20abort=20?= =?UTF-8?q?the=20current=20text=20field=20editor=20to=20allow=20to=20navig?= =?UTF-8?q?ate=20through=20the=20result=20menu=20items=20by=20using=20the?= =?UTF-8?q?=20keyboard=20-=20up=20to=20now=20one=20has=20to=20press=20?= =?UTF-8?q?=E2=86=91=20or=20=E2=86=93=20twice=20to=20select=20-=20still=20?= =?UTF-8?q?work=20in=20progress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Source') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 48de864f..2fec7d2f 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -3017,6 +3017,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. */ -- cgit v1.2.3