Merge lp:~fuegofro/unity/unity into lp:unity

Proposed by Danny Weinberg
Status: Rejected
Rejected by: Thomi Richards
Proposed branch: lp:~fuegofro/unity/unity
Merge into: lp:unity
Diff against target: 14 lines (+5/-0)
1 file modified
launcher/LauncherModel.cpp (+5/-0)
To merge this branch: bzr merge lp:~fuegofro/unity/unity
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Disapprove
Thomi Richards (community) Needs Fixing
Review via email: mp+108514@code.launchpad.net

Description of the change

Ensure sticky applications are shown before non-sticky applications in launcher. Previously the last sticky application would stay at the end of the list as more applications were opened. This prevents that from happening, ensuring that sticky applications are ordered properly at the beginning of the list, as expected. To test this, I logged out and back in and opened an application, making sure that the new application was placed after the sticky applications. This fixes bug 885937. The change can be found in revision 2374 of branch ~fuegofro/unity/unity

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi,

Thanks for your merge proposal. The fix looks good, but we need a test before this can be merged into Unity. Are you able to run the autopilot tests? If so, it should be reasonably easy to write an autopilot test that tests this code.

If you have any questions, feel free to ask me on IRC.

Cheers,

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Ensure sticky applications are shown before non-sticky applications in launcher.

I'm not sure this is the wanted design.

review: Disapprove

Unmerged revisions

2375. By Danny Weinberg <email address hidden>

Merge

2374. By Danny Weinberg <email address hidden>

Ensure sticky applications are shown before non-sticky applications in launcher

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/LauncherModel.cpp'
2--- launcher/LauncherModel.cpp 2012-05-07 19:52:54 +0000
3+++ launcher/LauncherModel.cpp 2012-06-04 02:04:24 +0000
4@@ -80,6 +80,11 @@
5 else if (first->GetIconType() > second->GetIconType())
6 return false;
7
8+ if (first->IsSticky() && !second->IsSticky())
9+ return true;
10+ else if (!first->IsSticky() && second->IsSticky())
11+ return false;
12+
13 return first->SortPriority() < second->SortPriority();
14 }
15