Skip to content
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

Allow to show or hide menu items #172

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Sep 30, 2020

Note: This PR is going to be merged into sprint-108 branch instead of master. There are some WIP features (i.e., nesting tables) and they all will be merged together into master to bump so versions only once.

Problem

A new YMenuBar was added to libyui, but it lacks of the capability to show/hide items. Although such feature is not used by YaST at all, it is still useful for some third-party users of the library (i.e., libyui-mga).

Solution

Extend public API of YMenuBar to allow to indicate whether an item is visible or not. Note that it is possible to hide both: top level menus and also menu items.

See examples/MenuBar1.cc for an usage example.

Changes

The sprint-108 branch is accumulating several new features. The plan is to merge them all into master and bump the so versions only once. At that time, we will provide an entry in the changes file. Here is a proposal for that changes entry:

* Resolve hotkeys conflicts for widgets with multiple hotkeys
  (related to bsc#1175489).
* Allow to show/hide menus and menu items (related to
  manatools/libyui-mga#1).
* Allow nested items in tables (bsc#1176402).

@joseivanlopez joseivanlopez changed the title Allow to show and hide a menu items Allow to show and hide menu items Sep 30, 2020
@joseivanlopez joseivanlopez changed the title Allow to show and hide menu items Allow to show or hide menu items Sep 30, 2020
Copy link
Member

@mvidner mvidner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Please add a *.changes entry too

@mvidner
Copy link
Member

mvidner commented Sep 30, 2020

Please reference the mga issue manatools/libyui-mga#1

@joseivanlopez
Copy link
Contributor Author

joseivanlopez commented Sep 30, 2020

Thanks!
Please add a *.changes entry too

The plan is to add a big .changes entry when we are going to merge sprint-108 into master. Right now, sprint-108 contains several new features that deserve a comment in the changes file.

@joseivanlopez
Copy link
Contributor Author

Please reference the mga issue manatools/libyui-mga#1

Commented here manatools/libyui-mga#1 (comment).

@mvidner
Copy link
Member

mvidner commented Oct 1, 2020

Now I realize that ideally we should have an automated test case, but I am not done making the framework for that just yet 😃

But could you please have a look at yast/yast-ycp-ui-bindings#56 , specifically this test, and check whether examples/MenuBar1 would work using that approach?

@joseivanlopez
Copy link
Contributor Author

Now I realize that ideally we should have an automated test case, but I am not done making the framework for that just yet smiley

But could you please have a look at yast/yast-ycp-ui-bindings#56 , specifically this test, and check whether examples/MenuBar1 would work using that approach?

Yes, I think we can follow that approach to test examples/MenuBar1. Initially, grep should find the menu label, and then, after "clicking" the "Visible" checkbox, the menu should not be found by grep.

@joseivanlopez joseivanlopez merged commit 5395a61 into libyui:sprint-108 Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants