|
|
477568 |
From 1b6eb29ade832647510b36ddc13c9b88a25036df Mon Sep 17 00:00:00 2001
|
|
|
477568 |
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
|
477568 |
Date: Wed, 11 Sep 2019 20:18:20 +0200
|
|
|
477568 |
Subject: [PATCH 1/4] extensionSystem: Handle added or removed sessionMode
|
|
|
477568 |
extensions
|
|
|
477568 |
|
|
|
477568 |
Right now we're only handling added sessionMode extensions correctly on
|
|
|
477568 |
sessionMode updates, also handle the other case and disable removed
|
|
|
477568 |
sessionMode extensions on sessionMode updates.
|
|
|
477568 |
|
|
|
477568 |
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
|
|
|
477568 |
---
|
|
|
477568 |
js/ui/extensionSystem.js | 4 ++--
|
|
|
477568 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
477568 |
|
|
|
477568 |
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
|
|
|
477568 |
index 81804ea5e..77929f2a6 100644
|
|
|
477568 |
--- a/js/ui/extensionSystem.js
|
|
|
477568 |
+++ b/js/ui/extensionSystem.js
|
|
|
477568 |
@@ -515,62 +515,62 @@ var ExtensionManager = class {
|
|
|
477568 |
if (!this._initted) {
|
|
|
477568 |
this._loadExtensions();
|
|
|
477568 |
this._initted = true;
|
|
|
477568 |
} else {
|
|
|
477568 |
this._enabledExtensions.forEach(uuid => {
|
|
|
477568 |
this._callExtensionEnable(uuid);
|
|
|
477568 |
});
|
|
|
477568 |
}
|
|
|
477568 |
this._enabled = true;
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
_disableAllExtensions() {
|
|
|
477568 |
if (!this._enabled)
|
|
|
477568 |
return;
|
|
|
477568 |
|
|
|
477568 |
if (this._initted) {
|
|
|
477568 |
this._extensionOrder.slice().reverse().forEach(uuid => {
|
|
|
477568 |
this._callExtensionDisable(uuid);
|
|
|
477568 |
});
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
this._enabled = false;
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
_sessionUpdated() {
|
|
|
477568 |
// For now sessionMode.allowExtensions controls extensions from both the
|
|
|
477568 |
// 'enabled-extensions' preference and the sessionMode.enabledExtensions
|
|
|
477568 |
// property; it might make sense to make enabledExtensions independent
|
|
|
477568 |
// from allowExtensions in the future
|
|
|
477568 |
if (Main.sessionMode.allowExtensions) {
|
|
|
477568 |
- if (this._initted)
|
|
|
477568 |
- this._enabledExtensions = this._getEnabledExtensions();
|
|
|
477568 |
+ // Take care of added or removed sessionMode extensions
|
|
|
477568 |
+ this._onEnabledExtensionsChanged();
|
|
|
477568 |
this._enableAllExtensions();
|
|
|
477568 |
} else {
|
|
|
477568 |
this._disableAllExtensions();
|
|
|
477568 |
}
|
|
|
477568 |
}
|
|
|
477568 |
};
|
|
|
477568 |
Signals.addSignalMethods(ExtensionManager.prototype);
|
|
|
477568 |
|
|
|
477568 |
class ExtensionUpdateSource extends MessageTray.Source {
|
|
|
477568 |
constructor() {
|
|
|
477568 |
const appSys = Shell.AppSystem.get_default();
|
|
|
477568 |
this._app = appSys.lookup_app('gnome-shell-extension-prefs.desktop');
|
|
|
477568 |
|
|
|
477568 |
super(this._app.get_name());
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
getIcon() {
|
|
|
477568 |
return this._app.app_info.get_icon();
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
_createPolicy() {
|
|
|
477568 |
return new MessageTray.NotificationApplicationPolicy(this._app.id);
|
|
|
477568 |
}
|
|
|
477568 |
|
|
|
477568 |
open() {
|
|
|
477568 |
this._app.activate();
|
|
|
477568 |
Main.overview.hide();
|
|
|
477568 |
Main.panel.closeCalendar();
|
|
|
477568 |
}
|
|
|
477568 |
}
|
|
|
477568 |
--
|
|
|
477568 |
2.27.0
|
|
|
477568 |
|