Merge lp://staging/~osomon/unity/dash-custom-home-screen into lp://staging/unity
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Gord Allott | ||||
Proposed branch: | lp://staging/~osomon/unity/dash-custom-home-screen | ||||
Merge into: | lp://staging/unity | ||||
Diff against target: |
387 lines (+254/-59) 4 files modified
plugins/unityshell/src/JSONParser.cpp (+13/-0) plugins/unityshell/src/JSONParser.h (+4/-0) plugins/unityshell/src/PlacesHomeView.cpp (+233/-59) plugins/unityshell/src/PlacesHomeView.h (+4/-0) |
||||
To merge this branch: | bzr merge lp://staging/~osomon/unity/dash-custom-home-screen | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Tilloy | Disapprove | ||
Gord Allott (community) | Needs Information | ||
Review via email: mp+83175@code.staging.launchpad.net |
Commit message
Allow customizing the dash’s home screen.
The contents of the custom home screen are described in a JSON file called HomeShortcutsCu
The file is looked for in the following locations in decreasing order of priority:
- $XDG_CONFIG_
- $DIR/unity/ for $DIR in $XDG_CONFIG_DIRS
The syntax of the file is as follows:
=======
{
"shortcut1": {
"source": $source,
"name": $name,
"name[fr]": $name_in_french,
[…]
"icon": $icon
},
"shortcut2": {
[…]
},
[…]
}
=======
The source attribute may either be a desktop file (full path or just its basename if it is located in a standard directory), or a lens file (basename only). This attribute is mandatory.
The 'name' attribute is optional. If present, it will override the default display name as advertised by the desktop file or by the lens. The name can be localized in several languages using the square brackets suffix notation, in which case the locale matching the system’s will be used, defaulting to the untranslated 'name' attribute if necessary.
The 'icon' attribute is optional. If present, it will override the default icon as advertised by the desktop file or by the lens. It should be a full path name.
If the source is a lens, the optional 'filter' attribute allows specifying a filter in the form "$name:$value", e.g. "type:videos" for the files lens.
If the source is a lens, the optional 'section' attribute allows specifying a section number (an integer starting at index 0).
Description of the change
So it seems that the patch I wrote some time ago to make the home screen of the dash customizable just like in unity-2d is being considered for inclusion in Oneiric…
I refreshed it to apply against the current trunk, functional testing and comments are welcome. Please bear with me as I’m not really familiar with unity’s code base, coding style and conventions.
Unmerged revisions
- 1741. By Olivier Tilloy
-
Cosmetics: replace a #define by a global variable in the unnamed namespace.
- 1740. By Olivier Tilloy
-
Allow customizing the dash’s home screen.
The contents of the custom home screen are described in a JSON file called HomeShortcutsCu
stomized. json. The file is looked for in the following locations in decreasing order of priority:
- $XDG_CONFIG_HOME/unity/ (defaults to $HOME/. config/ unity/)
- $DIR/unity/ for $DIR in $XDG_CONFIG_DIRSThe syntax of the file is as follows:
============== ======= ======= ======= ======= ======= ======= ======= ======= ====
{
"shortcut1": {
"source": $source,
"name": $name,
"name[fr]": $name_in_french,
[…]
"icon": $icon
},
"shortcut2": {
[…]
},
[…]
}
============== ======= ======= ======= ======= ======= ======= ======= ======= ==== The source attribute may either be a desktop file (full path or just its basename if it is located in a standard directory), or a lens file (basename only). This attribute is mandatory.
The 'name' attribute is optional. If present, it will override the default display name as advertised by the desktop file or by the lens. The name can be localized in several languages using the square brackets suffix notation, in which case the locale matching the system’s will be used, defaulting to the untranslated 'name' attribute if necessary.
The 'icon' attribute is optional. If present, it will override the default icon as advertised by the desktop file or by the lens. It should be a full path name.
If the source is a lens, the optional 'filter' attribute allows specifying a filter in the form "$name:$value", e.g. "type:videos" for the files lens.
If the source is a lens, the optional 'section' attribute allows specifying a section number (an integer starting at index 0).
I am not sure how this relates to bug #885738...