environment: move more init stuff here from main.js
Move some more environment-initializationy stuff from main.js to environment.js, and be more careful about not importing shell JS modules until after the environment has been fully patched. Change gnome-shell-plugin to call Environment.init() before Main.start(); this means that Environment.init() now runs before any shell JS modules (besides environment itself) have been imported. Make run-js-test create a ShellGlobal and use its js_context, so that the shell_global_set_property_mutable() stuff in Environment.init() will work correctly in tests as well. https://bugzilla.gnome.org/show_bug.cgi?id=649203
This commit is contained in:
@ -178,7 +178,8 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
|
||||
gjs_context = _shell_global_get_gjs_context (shell_plugin->global);
|
||||
|
||||
if (!gjs_context_eval (gjs_context,
|
||||
"const Main = imports.ui.main; Main.start();",
|
||||
"imports.ui.environment.init();"
|
||||
"imports.ui.main.start();",
|
||||
-1,
|
||||
"<main>",
|
||||
&status,
|
||||
|
Reference in New Issue
Block a user