Merge lp:~mterry/unity/despread into lp:unity

Proposed by Michael Terry
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 956
Proposed branch: lp:~mterry/unity/despread
Merge into: lp:unity
Diff against target: 46 lines (+10/-8)
1 file modified
src/BamfLauncherIcon.cpp (+10/-8)
To merge this branch: bzr merge lp:~mterry/unity/despread
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+53318@code.launchpad.net
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 'src/BamfLauncherIcon.cpp'
2--- src/BamfLauncherIcon.cpp 2011-02-11 17:03:24 +0000
3+++ src/BamfLauncherIcon.cpp 2011-03-14 20:51:46 +0000
4@@ -64,13 +64,14 @@
5 running = bamf_view_is_running (BAMF_VIEW (m_App));
6
7 /* Behaviour:
8- * Nothing running -> launch application
9- * Running and active -> spread application
10- * Spread is active and different icon pressed -> change spread
11- * Spread is active -> Spread de-activated, and fall through
12+ * 1) Nothing running -> launch application
13+ * 2) Running and active -> spread application
14+ * 3) Running and not active -> focus application
15+ * 4) Spread is active and different icon pressed -> change spread
16+ * 5) Spread is active -> Spread de-activated, and fall through
17 */
18
19- if (!running)
20+ if (!running) // #1 above
21 {
22 if (GetQuirk (QUIRK_STARTING))
23 return;
24@@ -80,18 +81,19 @@
25 }
26 else if (scaleWasActive)
27 {
28- if (!Spread (0, false))
29+ if (active || // #5 above
30+ !Spread (0, false)) // #4 above
31 {
32 PluginAdapter::Default ()->TerminateScale ();
33 Focus ();
34 _launcher->SetLastSpreadIcon (NULL);
35 }
36 }
37- else if (!active)
38+ else if (!active) // #3 above
39 {
40 Focus ();
41 }
42- else if (active && !scaleWasActive)
43+ else if (active && !scaleWasActive) // #2 above
44 {
45 Spread (0, false);
46 }