extensionUtils: Use signals rather than callbacks for finding extensions
This allows us to move to a file-monitor based approach in the future. Since we need signals, we convert the current set of functions to an object we attach signals too, leading to the new ExtensionFinder object. https://bugzilla.gnome.org/show_bug.cgi?id=677586
This commit is contained in:
@ -262,8 +262,10 @@ function init() {
|
||||
}
|
||||
|
||||
function loadExtensions() {
|
||||
ExtensionUtils.scanExtensions(function(uuid, dir, type) {
|
||||
let finder = new ExtensionUtils.ExtensionFinder();
|
||||
finder.connect('extension-found', function(signals, uuid, dir, type) {
|
||||
let enabled = enabledExtensions.indexOf(uuid) != -1;
|
||||
loadExtension(dir, type, enabled);
|
||||
});
|
||||
finder.scanExtensions();
|
||||
}
|
||||
|
Reference in New Issue
Block a user