Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell
a622aba7eb
The "extension" object is what I previously called the "helper" object. It contains the extension importer object as well as the metadata object. Things that were previously added on to the metadata (state, path, dir, etc.) are now part of this new "extension" object. With the new importer changes brought on by the extension prefs tool, extensions are left without a way to import submodules at the global scope, which would make them rely on techniques like: var MySubModule; function init(meta) { MySubModule = meta.importer.mySubModule; } That is, there's now a lot more meaningless boilerplate that nobody wants to write and nobody wants to reivew. Let's solve this with a few clever hacks. Allow extensions to get their current extension object with: let extension = imports.misc.extensionUtils.getCurrentExtension(); As such, extensions can now get their own extension object before the 'init' method is called, so they can import submodules or do other things at the module scope: const MySubModule = extension.imports.mySubModule; const dataPath = GLib.build_filenamev([extension.path, 'awesome-data.json']); https://bugzilla.gnome.org/show_bug.cgi?id=668429 |
||
---|---|---|
.settings | ||
browser-plugin | ||
data | ||
docs | ||
js | ||
man | ||
po | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
.project | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
gnome-shell.doap | ||
MAINTAINERS | ||
Makefile.am | ||
NEWS | ||
README |
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience. For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see: http://live.gnome.org/GnomeShell Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell' product. License ======= GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.