Merge lp://staging/~3v1n0/unity/keep-priority-launcher-model into lp://staging/unity
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Azzarone (community) | Approve | ||
jenkins | continuous-integration | Pending | |
Review via email:
|
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.
LGTM... Discussed and reviewed on IRC.