~azzar1/unity/fix-919567

Viewing all changes in revision 1868.

  • Committer: Tarmac
  • Author(s): Mikkel Kamstrup Erlandsen
  • Date: 2012-01-26 12:25:13 UTC
  • mfrom: (1825.2.61 home-lenses)
  • Revision ID: tarmac-20120126122513-c9tv693miz45cd94
Replace the Unity home screen tiles with a "merged lens view" where lenses can contribute any categories they see fit.

settings: introduced a new gsettings key in the com.canonical.Unity.Dash namespace that controls the order of the results on the home screen. We should consider in a later branch having the sorting logic in FilesystemLenses also use this key (still falling back to alphabetical sorting when nothing is set). It empowers users and OEMs to override the default view on the homescreen by putting custom stuff first.

libunity-core: Added a HomeLens class that implements Lens and Lenses interfaces. The typical use case is to add a FilesystemLenses to the HomeLens which will make it automatically merge all lenses found on the fs. In testing we implement custom Lenses instances and add those to the HomeLens in stead.

unityshell: Removed the tiled homescreen and use a bog standard LensView to render the HomeLens in stead. Fixed a bunch of places where we assumed that Lenses' categories were always only appended to. This is no longer true with the HomeLens. Also important: Fix the SetViewType() calling semantics to the lenses when showing/hiding the dash and when switching between the lenses.

Testing it out:
For this branch to work you need also: lp:~kamstrup/unity-lens-applications/home-lenses, lp:~kamstrup/unity-lens-files/home-lenses, and lp:~mhr3/unity-lens-music/home-lenses. Add to that latest bamf. Without these you will not see the correct results.

To validate the results: Make sure that bringing up the dash resets the search and shows you a default view with exactly 3 categories in this order: Recent Apps, Recent Files, and Downloads. Then do a search and validate that you have exactly 3 categories in this order Applications, Files & Folders, and Music.

Finally; launch an app that is not a favorite, then bring up the bring up the dash home screen and assert that the running app is *not* in the recent apps category (but showing in the launcher). Then close the app and bring up the dash again. The app should now show under Recent Apps.

Design review:
Home screen without search: https://bugs.launchpad.net/unity/+bug/885738/+attachment/2690636/+files/unity-home-lens-design-review-1.png
Home screen with search: https://bugs.launchpad.net/unity/+bug/885738/+attachment/2690639/+files/unity-home-lens-design-review-2.png. Fixes: https://bugs.launchpad.net/bugs/885738, https://bugs.launchpad.net/bugs/914759. Appoved by Michal Hruby.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: