Hello,
I like to display a literal '&' in a UI dialog string like: ---------------------------------------------------------------- `InputField( `id(`options), _("Options (option1=value1&option2=value2)"), "" ) ---------------------------------------------------------------- but neither "Options (option1=value1&option2=value2)" nor "Options (option1=value1\046option2=value2)" works for me.
When I run the module with yast2 --gt module and with yast2 --qt module the text which is shown in the dialog is always
Options (option1=value1option2=value2)
i.e. the '&' character is omitted.
Kind Regards Johannes Meixner
Hi, Johannes,
I like to display a literal '&' in a UI dialog string like:
`InputField( `id(`options), _("Options (option1=value1&option2=value2)"),
Try doubling the & char. The above would then become: "Options (option1=value1&&option2=value2)"
Alas, it works only in Qt :( Gtk shows underscore and ncurses shows both &&'s
Conclusion: we can't do it now (at least not in widgets supporting activation by hotkey). I'm sorry I can't give you more positive answer.
fB.
Hello Katarina,
On Nov 13 17:16 Katarina Machalkova wrote (shortened):
Hi, Johannes,
I like to display a literal '&' in a UI dialog string like:
`InputField( `id(`options), _("Options (option1=value1&option2=value2)"),
Try doubling the & char. The above would then become: "Options (option1=value1&&option2=value2)"
Alas, it works only in Qt :( Gtk shows underscore and ncurses shows both &&'s
Conclusion: we can't do it now (at least not in widgets supporting activation by hotkey). I'm sorry I can't give you more positive answer.
Your answer is perfectly o.k. because a straightforward "impossible" saves a lot of time with useless trial and error attempts.
I already had changed my text to avoid the literal '&' but nevertheless I was interested how to do it.
For my understanding: Am I right that escaping like '&' or encoding like '\046' cannot work here because what the hotkey stuff gets is the result of escaping and encoding i.e. the hotkey stuff gets already a literal '&' (a byte with octal value 046) so that this character can no longer be used otherwise?
Kind Regards Johannes Meixner