From 6bee51ed33bb0dc8a061d82025eca9eda2ceb041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 May 2012 01:12:39 +0200 Subject: [PATCH] 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 --- js/ui/panel.js | 2 +- js/ui/sessionMode.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index 45aabb218..eb3a9e793 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -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); } diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index 3ab89c182..3e05400b9 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -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 } };