extensionSystem: Turn into a class
The extension system started out as a set of simple functions, but gained more state later, and even some hacks to emit signals without having an object to emit them on. There is no good reason for that weirdness, so rather than imitating an object, wrap the existing system into a real ExtensionManager object. https://bugzilla.gnome.org/show_bug.cgi?id=789852
This commit is contained in:

committed by
Florian Müllner

parent
d82810240f
commit
ea17740719
@ -7,7 +7,6 @@ const Signals = imports.signals;
|
||||
const System = imports.system;
|
||||
|
||||
const History = imports.misc.history;
|
||||
const ExtensionSystem = imports.ui.extensionSystem;
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const ShellEntry = imports.ui.shellEntry;
|
||||
const Tweener = imports.ui.tweener;
|
||||
@ -628,8 +627,8 @@ var Extensions = class Extensions {
|
||||
for (let uuid in ExtensionUtils.extensions)
|
||||
this._loadExtension(null, uuid);
|
||||
|
||||
ExtensionSystem.connect('extension-loaded',
|
||||
this._loadExtension.bind(this));
|
||||
Main.extensionManager.connect('extension-loaded',
|
||||
this._loadExtension.bind(this));
|
||||
}
|
||||
|
||||
_loadExtension(o, uuid) {
|
||||
|
Reference in New Issue
Block a user