sessionMode: Add allowSettings property
Add a sessionMode.allowSettings property, which determines whether menus in the top bar should allow access to System Settings or not. https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
@ -63,7 +63,11 @@ const XKBIndicator = new Lang.Class({
|
||||
|
||||
this._syncConfig();
|
||||
|
||||
if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
|
||||
// re-using "allowSettings" for the keyboard layout is a bit shady,
|
||||
// but at least for now it is used as "allow popping up windows
|
||||
// from shell menus"; we can always add a separate sessionMode
|
||||
// option if need arises.
|
||||
if (Main.sessionMode.allowSettings) {
|
||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
|
||||
Main.overview.hide();
|
||||
|
Reference in New Issue
Block a user