Re: extensions.gnome.org



Le jeudi 08 décembre 2011 à 23:12 +0100, Giovanni Campagna a écrit :
> Il giorno gio, 08/12/2011 alle 23.05 +0100, Bernd Schlapsi ha scritto:
> > Hello,
> > 
> > how do I correctly define/create an extension which uses gsettings to 
> > store some extension spezific settings?
[...]
> The short answer: you cannot.
> The long answer: you cannot in gnome 3.2 (glib 2.30), as GSettings needs
> schemas that are installed in $XDG_DATA_DIRS, and any other location
> will cause a crash. You can support gnome 3.4 (starting from 3.3.2 /
> glib 2.31.4 IIRC), using GSettingsSchemaSource.
> You can find an example of this at
> http://git.gnome.org/browse/gnome-shell-extensions/tree/lib/convenience.js

Actually, if you add $HOME/.local/share in the $XDG_DATA_DIRS variable,
gsettings will find schemas installed there.
This had to be defined before gnome-shell is run,
so /etc/X11/Xsession.d/ or /etc/X11/Xsession is a good place for that.
The drawback is you cannot rely on this if you want other users use your
extension ;)

My 2 cents,

-- 
Bastien Durel



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