extensionUtils: Remove installImporter()

The method is now unused, so remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2795>
This commit is contained in:
Florian Müllner 2023-06-08 18:36:48 +02:00 committed by Marge Bot
parent 972a3b2d44
commit c76861b3c1

View File

@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported ExtensionState, ExtensionType, getCurrentExtension,
getSettings, initTranslations, gettext, ngettext, pgettext,
openPrefs, isOutOfDate, installImporter, serializeExtension,
openPrefs, isOutOfDate, serializeExtension,
deserializeExtension, setCurrentExtension */
// Common utils for the extension system and the extension
@ -310,12 +310,3 @@ function deserializeExtension(variant) {
res.dir = Gio.File.new_for_path(res.path);
return res;
}
function installImporter(extension) {
let oldSearchPath = imports.searchPath.slice(); // make a copy
imports.searchPath = [extension.dir.get_parent().get_path()];
// importing a "subdir" creates a new importer object that doesn't affect
// the global one
extension.imports = imports[extension.uuid];
imports.searchPath = oldSearchPath;
}