Blame SOURCES/0001-extensions-Add-a-SESSION_MODE-extension-type.patch

21e770
From 720eb83ba0b0e5e37185d7e7ed86fe9175cf18f4 Mon Sep 17 00:00:00 2001
c7fac9
From: Rui Matos <tiagomatos@gmail.com>
c7fac9
Date: Fri, 8 Nov 2013 13:58:09 +0100
c7fac9
Subject: [PATCH] extensions: Add a SESSION_MODE extension type
c7fac9
c7fac9
This allows e.g. gnome-tweak-tool to present these extensions in a
c7fac9
different way since they can't be disabled.
c7fac9
---
c7fac9
 js/misc/extensionUtils.js | 3 ++-
c7fac9
 js/ui/extensionSystem.js  | 2 ++
c7fac9
 2 files changed, 4 insertions(+), 1 deletion(-)
c7fac9
c7fac9
diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js
21e770
index cf308b31f..fb1e2b506 100644
c7fac9
--- a/js/misc/extensionUtils.js
c7fac9
+++ b/js/misc/extensionUtils.js
c7fac9
@@ -13,7 +13,8 @@ const FileUtils = imports.misc.fileUtils;
c7fac9
 
c7fac9
 var ExtensionType = {
c7fac9
     SYSTEM: 1,
c7fac9
-    PER_USER: 2
c7fac9
+    PER_USER: 2,
c7fac9
+    SESSION_MODE: 3
c7fac9
 };
c7fac9
 
c7fac9
 // Maps uuid -> metadata object
c7fac9
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
21e770
index 6244c39b4..9ffdb4f3d 100644
c7fac9
--- a/js/ui/extensionSystem.js
c7fac9
+++ b/js/ui/extensionSystem.js
21e770
@@ -322,6 +322,8 @@ function _loadExtensions() {
c7fac9
     let finder = new ExtensionUtils.ExtensionFinder();
c7fac9
     finder.connect('extension-found', (finder, extension) => {
c7fac9
         loadExtension(extension);
c7fac9
+        if (Main.sessionMode.enabledExtensions.indexOf(extension.uuid) != -1)
c7fac9
+            extension.type = ExtensionUtils.ExtensionType.SESSION_MODE;
c7fac9
     });
c7fac9
     finder.scanExtensions();
c7fac9
 }
c7fac9
-- 
21e770
2.21.0
c7fac9