Merge lp:~aacid/unity/do_not_show_unsensitive_menu into lp:unity

Proposed by Albert Astals Cid on 2012-05-25
Status: Superseded
Proposed branch: lp:~aacid/unity/do_not_show_unsensitive_menu
Merge into: lp:unity
Diff against target: 11 lines (+1/-0)
1 file modified
panel/PanelIndicatorsView.cpp (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity/do_not_show_unsensitive_menu
Reviewer Review Type Date Requested Status
Thomi Richards (community) 2012-05-25 Needs Fixing on 2012-05-27
Review via email: mp+107378@code.launchpad.net

This proposal has been superseded by a proposal from 2012-05-31.

Commit Message

Do not show the menu if it is not sensitive when moving the mouse after opening a sensitive menu

Description of the Change

Do not show the menu if it is not sensitive.

As the bug says: If you have a disabled toplevel menu entry clicking on it does not open the menu, but if you open a different menu and then move the mouse over the disabled one it will get opened.

To post a comment you must log in.
Thomi Richards (thomir) wrote :

Nice fix - thanks!

I've verified that this works as expected. We'd love to have an autopilot test, or at least a manual test.

Can you find an application in the base Ubuntu install that has a disabled top level menu, and write a manual test in the unity source tree please?

With a manual test I'm happy to merge this.

Cheers,

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

I thought we would have a test for this already since the regular case, i.e. If you have a disabled toplevel menu entry clicking on it does not open the menu, already works without this patch.

This patch only fixes the fact that if you open a different menu (non disabled) and then move the mouse over the disabled one it will get opened.

Albert Astals Cid (aacid) wrote :

Have been searching for a while and could not find any program in the default ubuntu install that has disabled top level menus.

Albert Astals Cid (aacid) wrote :

Not in the default install, but qtcreator "Build" menu is disabled if no project is open (i.e. just after opening it)

Albert Astals Cid (aacid) wrote :

The "Go" menu in gnome-dictionary is also disabled.

Without this patch you can
 * Click on Go in the menu
 * See the menu does not open (this is correct)
 * Click on Help in the menu
 * Move over the Go menu
 * See how the Go menu opens (this is wrong)

If you use the patch the wrong part gets fixed

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/PanelIndicatorsView.cpp'
2--- panel/PanelIndicatorsView.cpp 2012-05-06 23:48:38 +0000
3+++ panel/PanelIndicatorsView.cpp 2012-05-25 13:44:15 +0000
4@@ -222,6 +222,7 @@
5 PanelIndicatorEntryView* view = entry.second;
6
7 if (!target && view->IsVisible() && view->IsFocused() &&
8+ view->IsSensitive() &&
9 view->GetAbsoluteGeometry().IsPointInside(x, y))
10 {
11 view->Activate(button);