diff --git a/data/org.gnome.shell.gschema.xml.in.in b/data/org.gnome.shell.gschema.xml.in.in
index abecd37ca..bacb6b1c8 100644
--- a/data/org.gnome.shell.gschema.xml.in.in
+++ b/data/org.gnome.shell.gschema.xml.in.in
@@ -39,6 +39,14 @@
will be displayed in the favorites area.
+
+ [ 'Utilities', 'Sundry' ]
+ <_summary>List of categories that should be displayed as folders
+ <_description>
+ Each category name in this list will be represented as folder in the
+ application view, rather than being displayed inline in the main view.
+
+
[]
<_summary>History for command (Alt-F2) dialog
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 3aad5b022..79f88b4fb 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -267,6 +267,9 @@ const AppDisplay = new Lang.Class({
this._appSystem.connect('installed-changed', Lang.bind(this, function() {
Main.queueDeferredWork(this._workId);
}));
+ global.settings.connect('changed::app-folder-categories', Lang.bind(this, function() {
+ Main.queueDeferredWork(this._workId);
+ }));
let box = new St.BoxLayout();
this.actor = new St.Bin({ child: box,
@@ -297,13 +300,17 @@ const AppDisplay = new Lang.Class({
var iter = root.iter();
var nextType;
+ let folderCategories = global.settings.get_strv('app-folder-categories');
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.DIRECTORY) {
var dir = iter.get_directory();
if (dir.get_is_nodisplay())
continue;
- _loadCategory(dir, this._view);
+ if (folderCategories.indexOf(dir.get_menu_id()) != -1)
+ this._view.addFolder(dir);
+ else
+ _loadCategory(dir, this._view);
}
}
this._view.loadGrid();