Mailinglist Archive: yast-devel (101 mails)

< Previous Next >
Re: [yast-devel] YCP: how to permanently bind the Enter key to a PushButton?
  • From: Johannes Meixner <jsmeix@xxxxxxx>
  • Date: Thu, 21 Jan 2010 11:25:13 +0100 (CET)
  • Message-id: <alpine.LNX.2.00.1001211103390.16750@xxxxxxxxxxxxxx>



On Jan 20 16:47 Johannes Meixner wrote (shortened):
It seems I found a way how to fix user input usability:

In each run of the UI::UserInput while loop
directly before I call UI::UserInput() I do
first replace the [Search for] button with itself
with `opt(`default) to enforce this default regardless
whatever function call or UI bug may have changed it
and then I set the focus to the InputField for the
search string so that the user can just start typing
and hit Enter to get what he wants.

It is annoying in particular in the text-only ncurses UI
when the focus becomes unconditioned set to the search string
in each run of the UI::UserInput while loop.

Therefore I changed it as follows:
Only when the user did already a search directly before,
set the focus to the InputField for the search string
so that the user can just type in another search string.

Now there is in source/printer/src/basicadd.ycp
in current YaST SVN:
( `id(`apply_driver_filter_replace_point),
( `id(`apply_driver_filter),
_("&Search for")
( `id(`driver_filter_input),
any user_input = nil;
while( true )
{ UI::ReplaceWidget( `id(`apply_driver_filter_replace_point),
( `id(`apply_driver_filter),
_("&Search for")
if( `apply_driver_filter == user_input )
{ UI::SetFocus( `driver_filter_input );
user_input = UI::UserInput();

It seems it becomes more and more complicated to implement
a usable search functionality which indicates that in the end
I may have to remove all those sophisticated code because
it may result more and more weird side effects so that
in the end the only possible way out is to fall back
and use whatever GUI default behaviour as is.

Kind Regards
Johannes Meixner
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >