Merge lp:~fboucault/unity-2d/spread_monitor_finer_change_notification into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Florian Boucault
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1000
Merged at revision: 1000
Proposed branch: lp:~fboucault/unity-2d/spread_monitor_finer_change_notification
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 19 lines (+7/-1)
1 file modified
libunity-2d-private/src/spreadmonitor.cpp (+7/-1)
To merge this branch: bzr merge lp:~fboucault/unity-2d/spread_monitor_finer_change_notification
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+92252@code.launchpad.net

Description of the change

Finer change notification for property SpreadMonitor::shown

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/spreadmonitor.cpp'
2--- libunity-2d-private/src/spreadmonitor.cpp 2012-02-08 15:29:04 +0000
3+++ libunity-2d-private/src/spreadmonitor.cpp 2012-02-09 11:45:23 +0000
4@@ -42,8 +42,14 @@
5 if (available) {
6 connect(dbusInterface(), SIGNAL(IsShownChanged(bool)), SIGNAL(shownChanged(bool)));
7
8- Q_EMIT shownChanged(shown());
9+ /* In SpreadMonitor::shown() we assume shown is false if the service is not
10+ available therefore there is no need to emit shownChanged if it is still false */
11+ if (shown()) {
12+ Q_EMIT shownChanged(true);
13+ }
14 } else {
15+ /* At this point we cannot know for sure that the spread was shown so
16+ we emit the changed signal unconditionally */
17 Q_EMIT shownChanged(false);
18 }
19 }

Subscribers

People subscribed via source and target branches