[yast-devel] Button Order
Fate #303446 covers a long-standing request: Support both GNOME and KDE button orders in YaST2. The UI now provides a new widget called ButtonBox that handles that in an abstract way. What we need to do now is to use that widget whereever appropriate. In many cases, this will be as simple as replacing `HBox( `PushButton(`id(`ok ), _( "&OK" ) ), `PushButton(`id(`cancel), _( "&Cancel" ) ) ) with `ButtonBox( `PushButton(`id(`ok ), _( "&OK" ) ), `PushButton(`id(`cancel), _( "&Cancel" ) ) ) More information at http://en.opensuse.org/YaST/Development/Misc/Button_Order [Any follow-up discussions please on yast-devel] CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Nürnberg, Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Thanks a lot for that, Stefan! Cu, Martin -- Martin Schmidkunz User Experience Specialist martin.schmidkunz@novell.com +49 (0) 911 740 53-346 ----------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) ----------------------------------------------------------------- Novell, Inc. SUSE® Linux Enterprise 10 Your Linux is ready http://www.novell.com/linux -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Stefan Hundhammer wrote:
... `ButtonBox( `PushButton(`id(`ok ), _( "&OK" ) ), `PushButton(`id(`cancel), _( "&Cancel" ) ) )
More information at
That's really great! :) I was trying to achieve something similar but as you knew what you were doing, you did it definitely better ;) And I also like the way you've documented it. Well done! Thx() && Bye() Lukas
Lukas Ocilka wrote:
Stefan Hundhammer wrote:
... `ButtonBox( `PushButton(`id(`ok ), _( "&OK" ) ), `PushButton(`id(`cancel), _( "&Cancel" ) ) )
More information at
That's really great! :) I was trying to achieve something similar but as you knew what you were doing, you did it definitely better ;)
And I also like the way you've documented it.
BTW: I'm not sure what to do with the Wizard YCP module. --- cut --- A ButtonBox can have only PushButton child widgets. It will refuse anything else. This is by design: The ButtonBox takes care of margins, spacings and alignment. Any other widgets (like HSpacing, HStretch, Right, Left, Center, etc.) would only be in the way. --- cut --- Wizard module uses `ReplacePoints to make replacing buttons possible (e.g., Wizard::SetBackButton()). Any idea? L.
On Donnerstag, 28. August 2008, Lukas Ocilka wrote:
BTW: I'm not sure what to do with the Wizard YCP module.
Leave it as it is. The wizard widget handles its buttons all by itself; the Gtk wizard widget can rearrange buttons if that should be necessary. And wizards have their [Next] etc. button in the bottom right corner anyway, so it's more like GNOME button order. BTW that's where the KDE button order is somewhat inconsistent. CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Nürnberg, Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hi, Since the wizard calls already convey the button's action already (SetBackButton(), SetNextButton(), ...), there's really no benefit of using this container other than possibly for technical simplification. In fact, -gtk already orders those buttons differently than -qt. Furthermore, the YButtonBox currently assesses the button's role by checking if its id is "ok", "yes", "yesButton", etc. We don't really want to use it across the board, beyond its intent purpose for confirmation dialogs. Cheers, Ricardo Qui, 2008-08-28 às 12:02 +0200, Lukas Ocilka escreveu:
BTW: I'm not sure what to do with the Wizard YCP module.
--- cut --- A ButtonBox can have only PushButton child widgets. It will refuse anything else. This is by design: The ButtonBox takes care of margins, spacings and alignment. Any other widgets (like HSpacing, HStretch, Right, Left, Center, etc.) would only be in the way. --- cut ---
Wizard module uses `ReplacePoints to make replacing buttons possible (e.g., Wizard::SetBackButton()).
Any idea?
L.
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
I just found a lot of places with `PushButton(... `opt(`customButton) ... ) This is generally not neccessary, nor is it desired. Please use that only if any of the heuristics go guess a button role from the button label, ID, or function key went wrong. I just updated the documentation to make this more clear. CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Nürnberg, Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (4)
-
Lukas Ocilka
-
Martin Schmidkunz
-
Ricardo Cruz
-
Stefan Hundhammer