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:
@ -889,7 +889,7 @@ const PopupMenuBase = new Lang.Class({
|
||||
|
||||
addSettingsAction: function(title, desktopFile) {
|
||||
// Don't allow user settings to get edited unless we're in a user session
|
||||
if (global.session_type != Shell.SessionType.USER)
|
||||
if (Main.sessionMode.sessionType != Shell.SessionType.USER)
|
||||
return null;
|
||||
|
||||
let menuItem = this.addAction(title, function() {
|
||||
|
Reference in New Issue
Block a user