Merge lp:~parnold-x/wingpanel/only_one_popover into lp:~wingpanel-devs/wingpanel/trunk

Proposed by Djax
Status: Merged
Approved by: Cody Garver
Approved revision: 130
Merged at revision: 131
Proposed branch: lp:~parnold-x/wingpanel/only_one_popover
Merge into: lp:~wingpanel-devs/wingpanel/trunk
Diff against target: 22 lines (+6/-0)
1 file modified
src/Services/PopoverManager.vala (+6/-0)
To merge this branch: bzr merge lp:~parnold-x/wingpanel/only_one_popover
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+297964@code.launchpad.net

Commit message

make sure only one popover is shown at a time

Description of the change

This makes sure that only one indicator can be shown at a time. So if something is opened and a new one is opened via a shortcut or something the actual visible popover will be closed before the new one is opened.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Seems fine!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Services/PopoverManager.vala'
2--- src/Services/PopoverManager.vala 2016-04-15 13:52:05 +0000
3+++ src/Services/PopoverManager.vala 2016-06-20 21:25:52 +0000
4@@ -72,6 +72,9 @@
5 popovers.@foreach ((popover, indicator_entry) => {
6 if (indicator_entry.base_indicator.code_name == code_name) {
7 if (visible) {
8+ if (visible_popover != null) {
9+ hide_popover ();
10+ }
11 popover.show_all ();
12 } else {
13 popover.hide ();
14@@ -88,6 +91,9 @@
15 if (popover.get_visible ()) {
16 popover.hide ();
17 } else {
18+ if (visible_popover != null) {
19+ hide_popover ();
20+ }
21 popover.show_all ();
22 }
23

Subscribers

People subscribed via source and target branches

to all changes: