Merge lp:~unity-team/unity/unity.fix-595880 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 338
Proposed branch: lp:~unity-team/unity/unity.fix-595880
Merge into: lp:unity
Diff against target: 47 lines (+15/-1)
2 files modified
unity-private/panel/panel-menu-manager.vala (+4/-0)
unity-private/panel/panel-view.vala (+11/-1)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-595880
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Review via email: mp+27944@code.launchpad.net

Description of the change

modified:
  unity-private/panel/panel-menu-manager.vala
  unity-private/panel/panel-view.vala

I've added the a public call popdown_current_menu() to MenuManager and added a signal-handler for "button-release-event" to Unity.Panel.View, which calls the former. This fixes LP: #595880

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) 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/panel/panel-menu-manager.vala'
2--- unity-private/panel/panel-menu-manager.vala 2010-06-03 09:53:03 +0000
3+++ unity-private/panel/panel-menu-manager.vala 2010-06-18 15:51:32 +0000
4@@ -39,6 +39,10 @@
5 current_menu = menu;
6 }
7
8+ public void popdown_current_menu ()
9+ {
10+ current_menu.popdown ();
11+ }
12
13 public bool menu_is_open ()
14 {
15
16=== modified file 'unity-private/panel/panel-view.vala'
17--- unity-private/panel/panel-view.vala 2010-06-10 03:37:34 +0000
18+++ unity-private/panel/panel-view.vala 2010-06-18 15:51:32 +0000
19@@ -37,7 +37,7 @@
20 public View (Shell shell)
21 {
22 Object (shell:shell,
23- reactive:false,
24+ reactive:true,
25 orientation:Ctk.Orientation.HORIZONTAL,
26 homogeneous:false,
27 spacing:0);
28@@ -74,9 +74,19 @@
29 pack (indicator_bar, false, true);
30 indicator_bar.show ();
31
32+ this.button_release_event.connect (this.on_button_release_event);
33+
34 END_FUNCTION ();
35 }
36
37+ private bool on_button_release_event (Clutter.Event e)
38+ {
39+ MenuManager manager = MenuManager.get_default ();
40+ manager.popdown_current_menu ();
41+
42+ return false;
43+ }
44+
45 public int get_indicators_width ()
46 {
47 return (int) this.indicator_bar.get_width ();