Merge lp://qastaging/~3v1n0/unity/launcher-draggable-icons-6.0 into lp://qastaging/unity/6.0

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2692
Proposed branch: lp://qastaging/~3v1n0/unity/launcher-draggable-icons-6.0
Merge into: lp://qastaging/unity/6.0
Diff against target: 7558 lines (+3857/-1097)
72 files modified
UnityCore/DesktopUtilities.cpp (+29/-9)
UnityCore/DesktopUtilities.h (+1/-0)
UnityCore/GLibDBusProxy.cpp (+0/-4)
com.canonical.Unity.gschema.xml (+3/-3)
launcher/AbstractLauncherIcon.h (+16/-2)
launcher/BFBLauncherIcon.cpp (+1/-0)
launcher/BamfLauncherIcon.cpp (+31/-48)
launcher/BamfLauncherIcon.h (+0/-1)
launcher/CMakeLists.txt (+1/-0)
launcher/DesktopLauncherIcon.cpp (+19/-6)
launcher/DesktopLauncherIcon.h (+4/-12)
launcher/DeviceLauncherSection.cpp (+14/-7)
launcher/DeviceLauncherSection.h (+3/-5)
launcher/DndData.cpp (+5/-5)
launcher/DndData.h (+1/-1)
launcher/ExpoLauncherIcon.cpp (+64/-0)
launcher/ExpoLauncherIcon.h (+45/-0)
launcher/FavoriteStore.cpp (+93/-4)
launcher/FavoriteStore.h (+21/-8)
launcher/FavoriteStoreGSettings.cpp (+67/-68)
launcher/FavoriteStoreGSettings.h (+7/-4)
launcher/FavoriteStorePrivate.cpp (+14/-0)
launcher/FavoriteStorePrivate.h (+3/-1)
launcher/HudLauncherIcon.cpp (+2/-1)
launcher/Launcher.cpp (+83/-108)
launcher/Launcher.h (+5/-8)
launcher/LauncherController.cpp (+526/-341)
launcher/LauncherController.h (+1/-3)
launcher/LauncherControllerPrivate.h (+28/-41)
launcher/LauncherIcon.cpp (+31/-4)
launcher/LauncherIcon.h (+5/-9)
launcher/LauncherModel.cpp (+34/-32)
launcher/MockLauncherIcon.h (+11/-15)
launcher/SoftwareCenterLauncherIcon.cpp (+27/-38)
launcher/SoftwareCenterLauncherIcon.h (+1/-1)
launcher/SpacerLauncherIcon.cpp (+1/-1)
launcher/SpacerLauncherIcon.h (+0/-4)
launcher/StandaloneLauncher.cpp (+1/-1)
launcher/TrashLauncherIcon.cpp (+1/-0)
launcher/VolumeLauncherIcon.cpp (+34/-4)
launcher/VolumeLauncherIcon.h (+3/-0)
manual-tests/Launcher.txt (+15/-0)
panel/PanelMenuView.h (+0/-1)
plugins/unityshell/src/unityshell.cpp (+5/-7)
plugins/unityshell/unityshell.xml.in (+0/-6)
tests/CMakeLists.txt (+19/-11)
tests/gmockvolume.c (+4/-3)
tests/test_bamf_launcher_icon.cpp (+70/-2)
tests/test_bfb_launcher_icon.cpp (+11/-8)
tests/test_desktop_launcher_icon.cpp (+80/-0)
tests/test_desktop_utilities.cpp (+52/-22)
tests/test_device_launcher_section.cpp (+19/-54)
tests/test_expo_launcher_icon.cpp (+58/-0)
tests/test_favorite_store.cpp (+111/-0)
tests/test_favorite_store_gsettings.cpp (+52/-29)
tests/test_hud_launcher_icon.cpp (+53/-0)
tests/test_launcher.cpp (+226/-15)
tests/test_launcher_controller.cpp (+1246/-44)
tests/test_launcher_icon.cpp (+113/-0)
tests/test_launcher_model.cpp (+182/-40)
tests/test_main.cpp (+1/-0)
tests/test_main_xless.cpp (+1/-1)
tests/test_mock_devices.h (+93/-0)
tests/test_software_center_launcher_icon.cpp (+74/-0)
tests/test_trash_launcher_icon.cpp (+39/-0)
tests/test_volume_launcher_icon.cpp (+67/-46)
unity-shared/PluginAdapter.h (+2/-0)
unity-shared/PluginAdapterCompiz.cpp (+5/-0)
unity-shared/PluginAdapterStandalone.cpp (+15/-7)
unity-shared/WindowManager.cpp (+5/-0)
unity-shared/WindowManager.h (+1/-0)
unity-standalone/StandaloneUnity.cpp (+2/-2)
To merge this branch: bzr merge lp://qastaging/~3v1n0/unity/launcher-draggable-icons-6.0
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Brandon Schaefer (community) Approve
Review via email: mp+124838@code.qastaging.launchpad.net

Commit message

LauncherController, FavoriteStore, Launcher, Icons: always use sort priority based on favorites to get positioned on launcher

This is the continuum of the work started in lp:~3v1n0/unity/keep-priority-launcher-model, here we use the launcher icons priority to correctly order the icons in the launcher, based on the position that they have in the favorite store.

The unity launcher favorite store now handles not only desktop paths or id but also (mostly) icons uris (such as application://desktop-id or unity://desktop-icon or device://uuid); these values are used by LauncherController to dispose these icons in the launchers.

To do this, I had to change AbstractLauncherIcon to define a position property that now LauncherModel uses together with the icon priority (that is now set by default to the icon type but then can change during the usage, or based on favorites).

The icons ordering has changed a lot: now the favorites control everything (except BFB and trash) and we add the icons based on their defined position. Added two special places: "unity://running-apps" and "unity://devices" that optionally defines where these kind of icons should be placed. This is not strict by the way, because if these uris are not defined we add them by default at the bottom of the launcher main model.

When a new Device or Application icon is added to the launcher, we append it to the list of the non-sticky devices or applications.

Favorites reordering, removal or additions have been refactored to fit to our new system; when we save the favorites, the position of the "running-apps" or "attached-devices" is computed based on where the first icon of this type is placed.

The expo icon is handled differently, since it is not added if we have no workspaces available; it also updates its visibility based on the workspaces settings.

SoftwareCenterLauncher icons are now handled differently: we now fully consider them as sticky application icons, so we firstly add them to the model (setting their priority based on the last sticky icon we have), then we animate them. They already know where they should go, based on model calculations (also fixed a bug that caused them not to get the overlay shourtcut when added).

See other commit messages for more info, they should be quite comprehensive.

----

Testing: updated and added a lot of new unit tests to cover (hopefully) all the changes I've done (that's mostly why this diff is so big, since the real changes are less than the half of the changed code) and to test the areas that we never tested before, just few stats:

test-gtest: added 13 new test cases (+5%)
test-gtest-xless: added 94 new test cases (+56%)

Description of the change

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks go to me. +1

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

Approve as discussed 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/1337/console reported an error when processing this lp:~3v1n0/unity/launcher-draggable-icons-6.0 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.

Subscribers

People subscribed via source and target branches