Merge lp://staging/~3v1n0/unity/keep-priority-launcher-model into lp://staging/unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Timo Jyrinki
Approved revision: no longer in the source branch.
Merged at revision: 2660
Proposed branch: lp://staging/~3v1n0/unity/keep-priority-launcher-model
Merge into: lp://staging/unity
Diff against target: 1314 lines (+513/-454)
7 files modified
launcher/Launcher.cpp (+2/-1)
launcher/LauncherController.cpp (+1/-6)
launcher/LauncherModel.cpp (+191/-202)
launcher/LauncherModel.h (+19/-20)
launcher/MockLauncherIcon.h (+9/-9)
tests/test_launcher.cpp (+0/-4)
tests/test_launcher_model.cpp (+291/-212)
To merge this branch: bzr merge lp://staging/~3v1n0/unity/keep-priority-launcher-model
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
jenkins continuous-integration Pending
Review via email: mp+122699@code.staging.launchpad.net

Commit message

LauncherModel: rewrite the Reordering functions to keep the icon priority deltas

The priority of the icons added to the model was reset every time the model
was reordered; we should otherwise keep the priority deltas between icons
so that we can safely set them without be worried that a reorder would completely
reset them.
Also add IconIndex method to get the positio of a given icon.

Description of the change

The unity LauncherModel used the IconPriority value to sort icons, however it was resetting this value every time the model was reordered, and was not possible to keep the priority deltas between the icons.
I've rewritten the model functions to make them change the priority to a relative value, instead of absolute ones.

This work is preliminary to the work needed for bug #761155

Unit tests added and updated.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM... Discussed and reviewed on IRC.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1181/console reported an error when processing this lp:~3v1n0/unity/keep-priority-launcher-model branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1203/console reported an error when processing this lp:~3v1n0/unity/keep-priority-launcher-model branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1209/console reported an error when processing this lp:~3v1n0/unity/keep-priority-launcher-model branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1212/console reported an error when processing this lp:~3v1n0/unity/keep-priority-launcher-model branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.