Merge lp:~stolowski/unity-2d/desktop-menu-fix into lp:unity-2d

Proposed by Pawel Stolowski on 2012-04-04
Status: Merged
Approved by: Albert Astals Cid on 2012-04-05
Approved revision: 1047
Merged at revision: 1046
Proposed branch: lp:~stolowski/unity-2d/desktop-menu-fix
Merge into: lp:unity-2d
Diff against target: 43 lines (+14/-3) 2 files modified
To merge this branch: bzr merge lp:~stolowski/unity-2d/desktop-menu-fix
Reviewer Review Type Date Requested Status
Albert Astals Cid 2012-04-04 Approve on 2012-04-05
Review via email: mp+100825@code.launchpad.net

Commit Message

[panel] Show desktop menu if no application window is active.

Changed logic in AppNameApplet::updateWidgets() - showMenu flag doesn't require
a user application to be active (isUserVisibleApp) if we are going to show the desktop label

Description of the Change

[panel] Show desktop menu if no application window is active.
Changed logic in AppNameApplet::updateWidgets() - showMenu flag doesn't require
a user application to be active (isUserVisibleApp), as we always want to show
a menu (of an application, or desktop) as long as mouse is over it.

To post a comment you must log in.
1046. By Pawel Stolowski on 2012-04-05

Slightly changed showMenu logic to be on the safe side, as suggested by Albert.

1047. By Pawel Stolowski on 2012-04-05

Merge trunk.

Albert Astals Cid (aacid) wrote :

Looks good and Seems to work :-)

review: Approve

Preview Diff

1=== modified file 'panel/applets/appname/appnameapplet.cpp'
2--- panel/applets/appname/appnameapplet.cpp 2012-03-19 19:36:04 +0000
3+++ panel/applets/appname/appnameapplet.cpp 2012-04-05 09:49:19 +0000
4@@ -324,13 +324,13 @@
5 || KeyboardModifiersMonitor::instance()->keyboardModifiers() == Qt::AltModifier
6 || d->m_menuBarWidget->isOpened()
7 );
8- bool showMenu = isOpened && !d->m_menuBarWidget->isEmpty() && isUserVisibleApp;
9+ bool showDesktopLabel = !app;
10+ bool showMenu = isOpened && !d->m_menuBarWidget->isEmpty() && (isUserVisibleApp || showDesktopLabel);
11 bool dashCanResize = !DashClient::instance()->alwaysFullScreen();
12 bool dashIsVisible = DashClient::instance()->activeInScreen(panel()->screen());
13 bool hudIsVisible = HUDClient::instance()->activeInScreen(panel()->screen());
14 bool showWindowButtons = (isOpened && isMaximized) || dashIsVisible || hudIsVisible;
15 bool showAppLabel = !(isMaximized && showMenu) && isUserVisibleApp && isOnSameScreen;
16- bool showDesktopLabel = !app;
17
18 d->m_windowButtonWidget->setVisible(showWindowButtons);
19 d->m_maximizeButton->setIsDashButton(dashIsVisible);
20
21=== modified file 'tests/manual-tests/panel.txt'
22--- tests/manual-tests/panel.txt 2012-04-04 10:13:58 +0000
23+++ tests/manual-tests/panel.txt 2012-04-05 09:49:19 +0000
24@@ -20,7 +20,18 @@
25 * While the indicators menu is open, move the mouse to the left over the menu area of the rightmost monitor
26
27 --> Verify menu appears
28+
29 ----
30 * Launch a program that creates problems to unity-2d-panel (in my case tdriver_visualizer)
31-
32 --> Verify the panel is not empty (should say TDriver Visualizer bla bla)
33+
34+----
35+ * Have no application windows open
36+ * Verify 'Ubuntu Desktop' caption is displayed on the panel
37+ * Move mouse over over it.
38+ * Verify desktop menu is displayed, containing subset of Nautilus menu items + special items (e.g. Edit > Change Desktop Background).
39+ * Open an application
40+ * Verify that application menu replaces desktop menu when application has focus.
41+ * Click on the desktop.
42+ * Verify that desktop menu is available again when mouse is over it.
43+----

Subscribers

People subscribed via source and target branches