Mailinglist Archive: yast-devel (66 mails)

< Previous Next >
Re: [yast-devel] YaST in ruby and UI terms
* Josef Reidinger <jreidinger@xxxxxxx> [Jun 25. 2013 13:26]:

libyui-bindings has more complete examples
which could help guiding a decision.

To be honest, I don't like this examples, it looks like old C gtk where
create every element is pain.

Lol - I don't like it either. It should just server as an example for
the discussion.

Compare this examples with elegance of
translated YCP code -

Thanks, thats helpful. I was missing this context.

I just want to get rid of annoying id, header and opt term. So after
your comments I propose to create shortcuts
Id, Opt and Header that creates such terms.

This is one (nice) way to solve this.

term(:id, IDs::DEFAULT_TARGET),
term(:opt, :notify),
_('Default System &Target'),

would change to

_('Default System &Target'),

Another, probably more Ruby-like, is using hashes (as trailing

ComboBox _('Default System &Target'), [], :id => IDs::DEFAULT_TARGET, :opt =>

[I removed the parantheses for ComboBox for readability]

(see for

Comments ?

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB
16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >