Mailinglist Archive: yast-devel (122 mails)

< Previous Next >
Re: [yast-devel] New YCP module: Icon
  • From: Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 04 Dec 2007 18:59:13 +0000
  • Message-id: <1196794753.5258.11.camel@xxxxxxxxxxxx>
Ter, 2007-12-04 às 09:59 +0100, Lukas Ocilka escreveu:
Jiří Suchomel napsal(a):
This is how Icon module deals with it:
Icon::Simple ("warning") -> returns UI term
Icon::Simple ("error") -> returns UI term

Could you create also the shortcuts like

(or even Icon::Warning etc. if you don't intend to make Icon::Complex)

so the naming style of those functions is closer to the one used by
Popup/Report modules?

Good idea, thanks. These new functions have been added just now:


I would rather you guys let the UI-bridge provide the icons as we are
in a better position to honor user's settings. Besides, we might want
yast-ncurses to do a colored frames, or do some vertical Warning label
or something...

So, why not adding some `warn, `error, `info to UI::OpenDialog()? It
would also make it nicer for YCP writers.
Btw, checkout `warnColor and `errorColor on yast-gtk. It will use your
style icon there.


* Icon::Warning()
* Icon::Error()
* Icon::Info()

--- simple example ---
import "Icon";

textdomain "test";

UI::OpenDialog (
`opt (`decorated),
`VBox (
`MarginBox (2,1, `HBox (
`HWeight(1, `VBox (`Label (_("Warning")), Icon::Warning())),
`HWeight(1, `VBox (`Label (_("Error")), Icon::Error())),
`HWeight(1, `VBox (`Label (_("Info")), Icon::Info()))
`PushButton (_("&OK"))
--- simple example ---


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >