[Bug 230496] New: it is not possible to change items of MenuButton
https://bugzilla.novell.com/show_bug.cgi?id=230496 Summary: it is not possible to change items of MenuButton Product: openSUSE 10.2 Version: RC 5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: sh@novell.com ReportedBy: jsuchome@novell.com QAContact: jsrain@novell.com MenuButton widget doesn't support changing its list of items via UI::ChangeWidget -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 sh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from sh@novell.com 2007-01-10 10:29 MST ------- No. That would be a feature request. You can simply use UI::ReplaceWidget() which is only marginally less efficient than such a feature would be. Also, menus should not change on the fly. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 jsuchome@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Normal |Enhancement Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #2 from jsuchome@novell.com 2007-01-11 00:10 MST ------- So please treat it as a feature request. (Although I still think it is a bug and simple usage of UI::ReplaceWidget() is a hack.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 sh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mschmidkunz@novell.com Status|REOPENED |NEEDINFO Info Provider| |jsuchome@novell.com ------- Comment #3 from sh@novell.com 2007-01-11 04:04 MST ------- Well, what is the rationale for wanting to replace the items of a MenuButton? What is the use case? Menus that change on the fly are really, really bad style. The purpose of MenuButtons is to collapse some less frequently actions (usually expert-style actions) into one button rather than clutter dialogs with dozens of buttons. MenuButtons were never meant to act as a substitute for context menus. Context menus are just about the only place where changing menu items is acceptable form a usability perspective. While I know that sometimes MenuButtons are used as a substitute for a proper menu bar, I'd really appreciate if we introduce real menu bars properly if there is a need for it. Making workarounds with MenuButtons for that kind of thing will always be only a kludge. But even menu bars with pulldown menus (like seen in most other GUI applications) should generally not change their entries on the fly. Exceptions are things like a "most recently used" submenu in a "File" menu or similar. So, exactly what is this for? Do we need proper menus? If so, please let's do this right. Let's come up with a proper concept that includes actions that can be enabled and disabled and put into menus as well as tool bars. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 jsuchome@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|jsuchome@novell.com | ------- Comment #4 from jsuchome@novell.com 2007-01-17 02:26 MST ------- I don't mean the usage of MenuButton in the menu bar. Typical example is Set Filter menu button in Users module summary, it needs to change the items when you change the view from users to groups. I use it also as a widget with selection of languages for package description in add-on-creator - here when user selects the language, it has to be removed from the list of items. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 ------- Comment #5 from jsuchome@novell.com 2007-01-17 02:27 MST ------- Created an attachment (id=113286) --> (https://bugzilla.novell.com/attachment.cgi?id=113286&action=view) screenshot of yast2-add-on-creator usage of menubutton -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 sh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |LATER ------- Comment #6 from sh@novell.com 2007-01-17 04:12 MST ------- In both cases you have to change ALL the menu items anyway. It does not save anything to not use UI::ReplaceWidget(). It does not improve performance. All it does is add to the code bloat we are increasingly getting. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 jsuchome@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|LATER | ------- Comment #7 from jsuchome@novell.com 2007-01-17 04:20 MST -------
In both cases you have to change ALL the menu items anyway.
Sure - but this is true for every usage of UI::ChangeWidget (..., `Items).
All it does is add to the code bloat we are increasingly getting.
Why? When more widgets are able to support same parameters, it's always plus. What do you mean by solving this as LATER without notice when you plan to work on it? Why can't you treat it as a valid feature request? Sorry, but it looks like you were prepared to close it regardless the info you required :-( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 sh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |LATER ------- Comment #8 from sh@novell.com 2007-01-17 05:29 MST ------- This is not going to happen for SP1. It only clutters my Bugzilla list. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 ------- Comment #9 from mschmidkunz@novell.com 2007-02-13 10:22 MST ------- As far as I understood when a developer uses the UI::ChangeWidget then he expects it to change the items of a widget. If it doesnt provide it it strongly contradicts with the user expectations and it is not suitable for the task. Therefore it is not only a bug from a developers perspective but also from the usability perspective. BTW: I am just trying to get familiar to the structures within Suse/Novell, but as far as I understood, the TPM or PM are responsible for what is going to happen for SP1 (or maybe the TL because there are no resources to fulfill TPM requirements). So, what I mean: it is still a bug we should take care about and not just dump it into oblivion. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496 ------- Comment #10 from sh@novell.com 2007-02-14 03:48 MST ------- For one thing, there is a mechanism to do this: Wrap the MenuButton with a ReplacePoint and exchange the whole MenuButton. This is absolutely transparent to the user. As a matter of fact, this is the way had used to exchange the contents of SelectionBox etc. widgets until about one year ago. What Jiri wants here is a simpler API to do the same thing. And this is what frankly I see very little use for. It should not be so common a use case to change the content of menus on the fly that we need a very optimized API for it. To the contrary, in most cases I would strongly advise against changing menu entries dynamically at all. Of course, there are valid use cases for this, but only a few. Technically, the benefit is minimal. There is no performance gain whatsoever because the same data structures need to be parsed, most of what a menu button is all about needs to be destroyed internally one way or the other (what is left of a menu button when you exchange its contents? Little more than the frame around it that marks it as a button-like widget), and the absolute same amount of geometry management is necessary. So the only benefit is to make the code using it a little prettier. But only a very little. You need just the same amount of complex data structures for the menu description. Existing code would do this: UI::ReplaceWidget(`rep_menu, `MenuButton( "&Create", [ `item(`id(`folder), "&Folder" ), `menu( "&Document", [ `item(`id(`text), "&Text File" ), `item(`id(`image), "&Image" ) ] ) ] ) ); While what Jiri suggests would use this: UI::ChangeWidget(`menu, `Items, [ `item(`id(`folder), "&Folder" ), `menu( "&Document", [ `item(`id(`text), "&Text File" ), `item(`id(`image), "&Image" ) ] ) ] ); This is not any simpler, nor does it add any functionality. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=230496#c11
--- Comment #11 from Stefan Hundhammer
https://bugzilla.novell.com/show_bug.cgi?id=230496#c12
Stefan Hundhammer
https://bugzilla.novell.com/show_bug.cgi?id=230496#c13
Stefan Hundhammer
participants (1)
-
bugzilla_noreply@novell.com