sessionMode: Add hasAppMenu property

Add a sessionMode.hasAppMenu property, which determines whether
the top bar should contain a menu for the active application or
not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
Florian Müllner 2012-05-17 01:12:39 +02:00
parent 122bca49ea
commit 6bee51ed33
2 changed files with 3 additions and 1 deletions

View File

@ -972,7 +972,7 @@ const Panel = new Lang.Class({
this._menus.addMenu(this._activitiesButton.menu);
}
if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
if (Main.sessionMode.hasAppMenu) {
this._appMenu = new AppMenuButton(this._menus);
this._leftBox.add(this._appMenu.actor);
}

View File

@ -9,9 +9,11 @@ const DEFAULT_MODE = 'user';
const _modes = {
'gdm': { hasOverview: false,
hasAppMenu: false,
sessionType: Shell.SessionType.GDM },
'user': { hasOverview: true,
hasAppMenu: true,
sessionType: Shell.SessionType.USER }
};