Add sections to the all apps view

Separate out the main app view into different sections based on the categories
in the desktop file. The configuration is done via gmenu and the desktop menu
specification, we set XDG_MENU_PREFIX="gs-" on startup, so that gmenu reads
gs-applications.menu, which we install.

There is no support for "submenus" - only the menus directly under
Applications will be displayed as categories.
https://bugzilla.gnome.org/show_bug.cgi?id=614131
This commit is contained in:
Maxim Ermilov
2010-06-05 02:01:32 +04:00
parent ccbf247970
commit 3d60245b18
9 changed files with 199 additions and 9 deletions

View File

@ -40,6 +40,7 @@ dist_theme_DATA = \
theme/section-back.svg \
theme/section-more.svg \
theme/section-more-open.svg \
theme/separator-white.png \
theme/single-view-active.svg \
theme/single-view.svg \
theme/ws-switch-arrow-left.svg \
@ -49,12 +50,18 @@ dist_theme_DATA = \
schemadir = @GCONF_SCHEMA_FILE_DIR@
schema_DATA = gnome-shell.schemas
menudir = $(sysconfdir)/xdg/menus
menu_DATA = \
gs-applications.menu
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
EXTRA_DIST = \
gnome-shell.desktop.in.in \
gnome-shell-clock-preferences.desktop.in.in \
$(menu_DATA) \
$(schema_DATA)
CLEANFILES = \

36
data/gs-applications.menu Normal file
View File

@ -0,0 +1,36 @@
<Menu>
<Name>Applications</Name>
<DefaultAppDirs/>
<Menu>
<Name>Games</Name>
<Include>
<And>
<Category>Game</Category>
</And>
</Include>
</Menu>
<Menu>
<Name>Tools</Name>
<Include>
<Category>Development</Category>
<And>
<Category>System</Category>
<Not>
<Category>Settings</Category>
</Not>
</And>
<Category>Utility</Category>
</Include>
</Menu>
<Menu>
<Name>Other</Name>
<OnlyUnallocated/>
<Include>
<And>
<Not><Category>Core</Category></Not>
<Not><Category>Settings</Category></Not>
<Not><Category>Screensaver</Category></Not>
</And>
</Include>
</Menu>
</Menu>

View File

@ -520,6 +520,16 @@ StTooltip {
color: #ffffff;
}
.app-section-divider-container {
padding-top: 10px;
padding-bottom: 10px;
}
.app-section-divider {
height: 2px;
background-image: url("separator-white.png");
}
.all-app-controls-panel {
height: 30px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B