[gnome-shell/wip/rstrode/login-screen-extensions: 34/134] extensions: Add a SESSION_MODE extension type
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 34/134] extensions: Add a SESSION_MODE extension type
- Date: Thu, 26 Aug 2021 19:30:58 +0000 (UTC)
commit 73b3d5b671c24152fa064b7fe2362c5375df270b
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Nov 8 13:58:09 2013 +0100
extensions: Add a SESSION_MODE extension type
This allows e.g. gnome-tweak-tool to present these extensions in a
different way since they can't be disabled.
js/misc/extensionUtils.js | 3 ++-
js/ui/extensionSystem.js | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js
index cf308b31f1..fb1e2b506c 100644
--- a/js/misc/extensionUtils.js
+++ b/js/misc/extensionUtils.js
@@ -13,7 +13,8 @@ const FileUtils = imports.misc.fileUtils;
var ExtensionType = {
SYSTEM: 1,
- PER_USER: 2
+ PER_USER: 2,
+ SESSION_MODE: 3
};
// Maps uuid -> metadata object
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 6244c39b44..9ffdb4f3de 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -322,6 +322,8 @@ function _loadExtensions() {
let finder = new ExtensionUtils.ExtensionFinder();
finder.connect('extension-found', (finder, extension) => {
loadExtension(extension);
+ if (Main.sessionMode.enabledExtensions.indexOf(extension.uuid) != -1)
+ extension.type = ExtensionUtils.ExtensionType.SESSION_MODE;
});
finder.scanExtensions();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]