-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Widget: MenuBar #169
New Widget: MenuBar #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert here, but looks incredibly sensible to me.
Wait, did you just reimplement the |
See also manatools/libyui-mga#1 |
See also libyui/libyui-gtk#73 |
@shundhammer This is literally the worst way you could have handled this. You folks were definitely aware of |
If you don't like it, don't use it; very simple. And no, we don't do Gtk. |
I will say mine, the intention is always to be constructive and not polemical.
My main intention is to use libyui and not reinvent the wheel. libyui-mga is meant to collect missing and/or common manatools widgets. That means that if something is missing -in past it has not been easy to add things in libyui-master- we try to add ourselves in MGA plugin. Some mounth ago, people complained a lot the lack of menubar in dnfdragorta and i decided to try to develop it in mga plugin to avoid touching libyui objects. and with some ncurses exceptions works pretty well. The odd thing is that libyui implemented it some days after i finished... What you're asking now is to study libyui changes and adding gtk in again, doubling my works instead.... Repeat again your last words here:
Also that is pretty a lie, of course i can, but only because @Conan-Kudo and I can patch mageia and fedora packages, since libyui-binding issue 35 is still open since 29th Jun, much before new menubar widget came up in libyui. |
Thanks a lot for that. So let's all be constructive and see how we can move forward.
Note the "once that is done" part. The new MenuBar widget should not be considered as 100% finished. This is just the preliminary version we will likely refine in the following weeks based on the YaST requisites (we are starting to use it for real). As our own resources permit, we would also like to take into account the manatools requisites (as long as it's reasonable for us to tackle them).
Fully understood. That's why @shundhammer tried to take the Gtk backend into consideration (eg. providing a default
@shundhammer indeed took a look to your work before starting the new MenuBar implementation. But the way we use libyui in YaST (for example, we don't call libyui directly but through a YCPValue-based UI interpreter) made it more practical for us to use a different API than the one in
Understood.
In the way
I don't see how the new MenuBar class makes this worse. |
I didn't mean that, just that manatools is based on libyui-bindings for the most, first for perl, now more for python. So to use MGA plugin with new menubar without patching packagers, we also need that PR approved.
I think that too, but that does not change the fact I (or maybe someone else) need to do things twice.... :p |
hmmm i don't think it is enough... but at least builds :D ./MenuBar1 --gtk |
For a more exhaustive example, see yast/yast-storage-ng#1122 |
Trello
https://trello.com/c/4GtDpmMo/
Bugzilla
https://bugzilla.opensuse.org/show_bug.cgi?id=1175115
Overview
This adds a MenuBar widget to the YaST UI.
Features:
Caveat
We normally use wizards everywhere which is a completely different approach to user interfaces. In certain cases, though, a traditional menu bar with pulldown menus is still useful.
We have it in the PackageSelector (which is a high-level standalone widget that implements it in pure Qt or pure NCurses), but it would also be desirable to have it in the partitioner which has a lot of actions that are right now all organized in buttons or MenuButtons.
Screenshot
Details
Creating Menus
Add nested items, very much like for the tree widget.
Separators
Use an item with an empty label or with a label that starts with
---
(three "minus" signs).Enabling / Disabling Items
Create a hash with the IDs of the items that are to be enabled or disabled and a boolean for the new enabled/disabled status and call
UI.ChangeWidget(:menu_bar_id, :EnabledItems, my_hash)
with it:All other items in the menus will remain untouched, i.e. they will keep their current enabled / disabled status.
Comprehensive Example
See yast-ycp-ui-bindings/examples/MenuBar1.rb:
(Click the arrow to open)
Related PRs
libyui SO version bump PRs: