Mailinglist Archive: yast-devel (122 mails)

< Previous Next >
Re: [yast-devel] New YCP module: Icon
  • From: Lukas Ocilka <lukas.ocilka@xxxxxxx>
  • Date: Tue, 04 Dec 2007 09:59:34 +0100
  • Message-id: <475516F6.3040205@xxxxxxx>
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
Icon::SimpleWarning
Icon::SimpleError

(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:

* 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"))
)
);
UI::UserInput();
UI::CloseDialog();
}
--- simple example ---

Bye
Lukas

< Previous Next >