Keyboard focus sent to search field in help and browser tools

release
slava 2006-09-01 02:18:42 +00:00
parent 6617ebb155
commit 870846c7df
3 changed files with 7 additions and 13 deletions

View File

@ -7,7 +7,7 @@ namespaces gadgets-tracks gadgets-presentations gadgets-grids
gadgets-frames help gadgets-buttons gadgets-search ;
IN: gadgets-browser
TUPLE: browser navigator definitions ;
TUPLE: browser navigator definitions search ;
TUPLE: definitions showing ;
@ -86,9 +86,11 @@ C: browser ( -- gadget )
{
{ [ <navigator> ] set-browser-navigator f 1/5 }
{ [ <definitions> ] set-browser-definitions [ <scroller> ] 3/5 }
{ [ [ apropos ] <search-gadget> ] f f 1/5 }
{ [ [ apropos ] <search-gadget> ] set-browser-search f 1/5 }
} { 0 1 } make-track* ;
M: browser focusable-child* browser-search ;
: show-vocab ( vocab browser -- )
browser-navigator navigator-vocab set-model* ;

View File

@ -29,5 +29,7 @@ help-gadget {
C: help-gadget ( -- gadget )
dup init-history {
{ [ <help-pane> ] f f 4/5 }
{ [ [ search-help. ] <search-gadget> ] f f 1/5 }
{ [ [ search-help. ] <search-gadget> ] set-help-gadget-search f 1/5 }
} { 1 0 } make-track* ;
M: help-gadget focusable-child* help-gadget-search ;

View File

@ -25,13 +25,3 @@ C: search-gadget ( quot -- )
} make-frame* ;
M: search-gadget focusable-child* search-gadget-input ;
M: search-gadget pref-dim* drop { 400 500 } ;
: apropos-window
[ apropos ] <search-gadget>
"Apropos" open-titled-window ;
: search-help-window
[ search-help. ] <search-gadget>
"Search help" open-titled-window ;