Mailinglist Archive: yast-devel (74 mails)

< Previous Next >
Re: [yast-devel] PATCH: Clean up library to set dialog title and icon
Stanislav Visnovsky write:
Hi!

I wanted to start setting the dialog title for YaST dialogs and found out
there is the infastructure prepared on the libyui-side. Just YCP does not use
it.

This patch improves the Wizard library a bit to do setting both icon and
dialog title for the wizard dialog - the values are taken from the .desktop
file and are localized.

All you need to do in a module now is to replace

Wizard::SetDesktopIcon("desktop-file-name");

to

Wizard::SetDesktopTitleAndIcon("desktop-file-name");

If you accept the patch, I will go through the modules and start to change
them to use the new functionality.

Comments welcome!

Stano

P.S. There is no testsuite at the moment - desktop file reading involves
agents (see Lukas' mail about trouble there), also Wizard testsuite is rather
non-existent.


Patch looks fine, especially refactoring to separate method getLanguage
functionality, which looks quite tricky.
Own agent inlined to code looks...egh, tricky for me and little decrease
readability of code and also increase duplicity. Also redefiniting it everytime
looks like wasting for me. Can we store it somewhere and just say
register/unregister instead always define it again?
Josef


--
Josef Reidinger
Appliance Toolkit team
maintaining parts of webyast and SLMS
author of rubygems - studio_api and net_observer (coauthor)
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References