Split off the extension importing stuff into a new library, 'ShellJS'

This allows us to create a separate utility to import things from
shell extensions that does not have the entire Shell stack built up

https://bugzilla.gnome.org/show_bug.cgi?id=668429
This commit is contained in:
Jasper St. Pierre
2012-01-18 19:41:07 -05:00
parent d1d4142052
commit b2f33e2895
7 changed files with 125 additions and 72 deletions

View File

@ -8,6 +8,7 @@ const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const ShellJS = imports.gi.ShellJS;
const Soup = imports.gi.Soup;
const Config = imports.misc.config;
@ -388,7 +389,7 @@ function loadExtension(dir, type, enabled) {
let extensionModule;
let extensionState = null;
try {
global.add_extension_importer('imports.ui.extensionSystem.extensions', meta.uuid, dir.get_path());
ShellJS.add_extension_importer('imports.ui.extensionSystem.extensions', meta.uuid, dir.get_path());
extensionModule = extensions[meta.uuid].extension;
} catch (e) {
if (stylesheetPath != null)