[gnome-shell] sessionMode: Add hasAppMenu property
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] sessionMode: Add hasAppMenu property
- Date: Tue, 22 May 2012 17:46:30 +0000 (UTC)
commit 6bee51ed33bb0dc8a061d82025eca9eda2ceb041
Author: Florian MÃllner <fmuellner gnome org>
Date: Thu May 17 01:12:39 2012 +0200
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 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 45aabb2..eb3a9e7 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 3ab89c1..3e05400 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 }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]