Mailinglist Archive: yast-devel (101 mails)

< Previous Next >
Re: [yast-devel] YCP: how to permanently bind the Enter key to a PushButton?
  • From: Katarina Machalkova <kmachalkova@xxxxxxx>
  • Date: Wed, 20 Jan 2010 13:17:47 +0100
  • Message-id: <201001201317.53090.kmachalkova@xxxxxxx>
Hi,

I like to permanently bind the Enter key to a PushButton.

Currently I have in source/printer/src/basicadd.ycp
---------------------------------------------------------------
`HBox
( `PushButton
( `id(`apply_driver_filter),
`opt(`default),
_("&Search for")
),
`InputField
( `id(`driver_filter_input),
---------------------------------------------------------------

Hmm, I did exactly the same in webpin client ...
(http://bugzilla.novell.com/show_bug.cgi?id=538774)

Unfortunately `opt(`default) does not work here.

... and it worked reasonably well for me. Odd :(

Which UI are you trying, btw? It doesn't (never did and never will) work in
ncurses. Then maybe you're hitting a Gtk bug I had reported and Ricardo fixed
in the meantime (http://bugzilla.novell.com/show_bug.cgi?id=558900)

I assume whatever Wizard::... function call afterwards
invalids this `opt(`default) and re-sets the default
back to 'Next' or 'Back'.

I assumed this was gonna happen too, but in the end it was not the case.
Back then, to solve the problem I was thinking about adding a new function to
Wizard, something like Wizard::SetNextButtonNonDefault( any id, string label )
- much alike to existing SetNextButton() call, just without `opt(`default)

Which Wizard:: calls are used here? Maybe we'll need to extend the Wizard API
and/or fine-tune Wizard widget (used by GUIs) now ...

fB.
--
\\\\\ Katarina Machalkova
\\\\\\\__o YaST developer
__\\\\\\\'/_ & hedgehog painter
< Previous Next >
References