Merge lp:~unity-team/unity/unity.fix-for-quicklist-artifacts into lp:unity

Proposed by Jay Taoko
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 508
Proposed branch: lp:~unity-team/unity/unity.fix-for-quicklist-artifacts
Merge into: lp:unity
Diff against target: 20 lines (+10/-0)
1 file modified
unity-private/launcher/quicklist-controller.vala (+10/-0)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-for-quicklist-artifacts
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+35610@code.launchpad.net

Description of the change

In reference to bug 617339. This branch add the label menu item to the quicklist menu. There are cases when the quicklist is requested and the menu hasn't been previously filled with the label item.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-private/launcher/quicklist-controller.vala'
2--- unity-private/launcher/quicklist-controller.vala 2010-09-14 08:55:25 +0000
3+++ unity-private/launcher/quicklist-controller.vala 2010-09-16 00:17:51 +0000
4@@ -196,6 +196,16 @@
5 if (Unity.global_shell is Unity.Shell)
6 Unity.global_shell.add_fullscreen_request (this);
7
8+ if(menu.get_num_items() == 0)
9+ {
10+ // It can happen that the quicklist menu is requested and the menu was not previously filled with a label.
11+ // In this case we fill the menu with the label first.
12+ string label = attached_controller.name;
13+ var menuitem = new QuicklistMenuItem.with_label (label);
14+ menuitem.reactive = false;
15+ menu.append (menuitem, false);
16+ }
17+
18 menu.close_on_leave = false;
19 menu.set_detect_clicks (true);
20 // grab the top menu