Delegate mode information to a dedicated object
Rather than accessing global.session_type / global.session_mode all over the place, delegate mode information to a dedicated sessionMode object. While not very useful for now, we will replace checks for a particular mode with checks for particular properties that sessionMode defines based on global.session_mode. https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
@ -63,7 +63,7 @@ const XKBIndicator = new Lang.Class({
|
||||
|
||||
this._syncConfig();
|
||||
|
||||
if (global.session_type == Shell.SessionType.USER) {
|
||||
if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
|
||||
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