32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
--- Creating a New Extension ---
|
|
|
|
To create a new extension, add a subdirectory in extensions.
|
|
Then create a Makefile.am like the one in example, replacing
|
|
the EXTENSION_ID with the basename of your extension, which
|
|
must match the UUID in metadata.json.
|
|
If you need additional files, add them to EXTENSION_EXTRA.
|
|
|
|
Then modify extensions/Makefile.am and configure.ac. It should
|
|
be pretty self-explanatory.
|
|
|
|
Don't forget to add any translatable file to po/POTFILES.in, and
|
|
then you're done.
|
|
The Gettext domain you should choose is gnome-shell-extensions,
|
|
not gnome-shell, unless you're sure there is the string you
|
|
need in gnome-shell.
|
|
|
|
--- Coding Style ---
|
|
|
|
Generally, we follow GJS coding style (you can find it at
|
|
http://git.gnome.org/browse/gjs/tree/doc/Style_Guide.txt), which
|
|
in short is: indent 4 spaces, no tabs, space after comma, no space
|
|
after function call.
|
|
|
|
The Emacs mode line for this
|
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
|
|
Imports should be at the top, in two groups, one for standard
|
|
imports (like imports.lang or imports.dbus) and introspection,
|
|
the other for Shell API. Within the same group, put everything
|
|
in alphabetic order.
|