Re: Documentation for gnome-shell's Extension API



On Thu, 2014-05-08 at 14:38 +0100, Emmanuele Bassi wrote:
Also, on my Fedora 20 box, I have a bunch of JavaScript files
in /usr/share/gnome-shell/js that I can look through. However, on an
Arch Linux installation of mine (running GNOME 3.12), this directory
doesn't exist.

they are "compressed" into a single binary by default, but they can be
extracted, see this blog post about it:

http://blogs.gnome.org/mclasen/2014/03/24/keeping-gnome-shell-approachable/

Hi, again!

Thanks for your answers!

I have a follow-up question in regards to these extracted files.

I got going with extensions development by iteratively installing the
extension under development, pressing Alt+F2, and typing 'r' to restart
GNOME Shell and thus reload the extension. This is a bit cumbersome, and
it seems to me that I might be Doing It Wrong. Is there some way that I
could run the extension without restarting GNOME Shell, such as by
running it with gjs?

If I try to run the extension.js file using gjs, I'm getting a warning
like "(gjs:4023): Gjs-WARNING **: JS ERROR: Error: No JS module 'ui'
found in search path extension js:14". When I add a path to the "js"
directory using imports.searchPath.unshift, I get an error saying
"(gjs:4055): Gjs-CRITICAL **: JS ERROR: SyntaxError: syntax error
@ .../js/ui/endSessionDialog.js:46 JS_EvaluateScript() failed".

This fails at some D-Bus introspection XML, or something like that.
Should I perhaps "import" libgnome-shell.so instead? How would I do
that?

Thanks!

-- 
Jon Kristensen
0730 - 862 982
http://www.jonkri.com/

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]