diff options
author | Ray Strode <rstrode@redhat.com> | 2021-09-28 15:31:11 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2021-09-29 16:04:28 -0400 |
commit | a1ce46b2001ce111279275b4c811486c068b2600 (patch) | |
tree | bb40f0f78553118cd1d9cbf633bc8878e9f78009 | |
parent | ba966ca36c5a9cbf08dadd2001c68b3d595cc35c (diff) | |
download | gnome-shell-wip/rstrode/login-screen-extensions.tar.gz |
sessionMode: Drop allowExtensions propertywip/rstrode/login-screen-extensions
Now that we allow extensions at the lock screens, extensions
are allowed for every session mode gnome-shell would typically
change to at runtime.
This means there's little advantage to having an allowExtensions
property in the session mode definition.
This commit simplifies the code a bit by dropping the property.
Third party session modes can still lock down extensions through
gsettings if they need to.
-rw-r--r-- | js/ui/extensionSystem.js | 28 | ||||
-rw-r--r-- | js/ui/sessionMode.js | 4 |
2 files changed, 5 insertions, 27 deletions
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index 033a1881a..8b27ae414 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -89,16 +89,6 @@ var ExtensionManager = class { return false; } - _sessionModeCanUseExtension(uuid) { - if (!Main.sessionMode.allowExtensions) - return false; - - if (!this._extensionSupportsSessionMode(uuid)) - return false; - - return true; - } - _callExtensionDisable(uuid) { let extension = this.lookup(uuid); if (!extension) @@ -158,7 +148,7 @@ var ExtensionManager = class { } _callExtensionEnable(uuid) { - if (!this._sessionModeCanUseExtension(uuid)) + if (!this._extensionSupportsSessionMode(uuid)) return; let extension = this.lookup(uuid); @@ -425,7 +415,7 @@ var ExtensionManager = class { } _callExtensionInit(uuid) { - if (!this._sessionModeCanUseExtension(uuid)) + if (!this._extensionSupportsSessionMode(uuid)) return false; let extension = this.lookup(uuid); @@ -645,17 +635,9 @@ var ExtensionManager = class { } _sessionUpdated() { - // For now sessionMode.allowExtensions controls extensions from both the - // 'enabled-extensions' preference and the sessionMode.enabledExtensions - // property; it might make sense to make enabledExtensions independent - // from allowExtensions in the future - if (Main.sessionMode.allowExtensions) { - // Take care of added or removed sessionMode extensions - this._onEnabledExtensionsChanged(); - this._enableAllExtensions(); - } else { - this._disableAllExtensions(); - } + // Take care of added or removed sessionMode extensions + this._onEnabledExtensionsChanged(); + this._enableAllExtensions(); } }; Signals.addSignalMethods(ExtensionManager.prototype); diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index 7629a509b..92d91fc60 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -20,7 +20,6 @@ const _modes = { showCalendarEvents: false, showWelcomeDialog: false, allowSettings: false, - allowExtensions: false, allowScreencast: false, enabledExtensions: [], hasRunDialog: false, @@ -42,7 +41,6 @@ const _modes = { }, 'gdm': { - allowExtensions: true, hasNotifications: true, isGreeter: true, isPrimary: true, @@ -59,7 +57,6 @@ const _modes = { }, 'unlock-dialog': { - allowExtensions: true, isLocked: true, unlockDialog: undefined, components: ['polkitAgent', 'telepathyClient'], @@ -76,7 +73,6 @@ const _modes = { showCalendarEvents: true, showWelcomeDialog: true, allowSettings: true, - allowExtensions: true, allowScreencast: true, hasRunDialog: true, hasWorkspaces: true, |