Il giorno gio, 26/05/2011 alle 22.09 +1000, Tim Cuthbertson ha scritto:
> On Wed, May 25, 2011 at 11:55 PM, Giovanni Campagna
> <scampa.giova...@gmail.com> wrote:
> > Il giorno mer, 25/05/2011 alle 22.14 +1000, Tim Cuthbertson ha scritto:
> >> Hi all,
> >>
> >> I'm planning to add some gsettings or gconf integration to Erick
> >> Pérez's workspace indicator extension
> >> (https://github.com/erick2red/shell-extensions) to allow the user to
> >> configure the label text format. So I have a couple of questions:
> >>
> >> - Is gsettings or gconf preferred for extension code? I have the vague
> >> impression that gsettings is newer and shinier, but not much more than
> >> that.
> >
> > GSettings is the only supported configuration system for GNOME 3.0.
> > GConf is deprecated (and it's likely to disappear soon from most
> > systems).
> 
> Ahh ok, thanks.
> 
> >> - Is there a designated (or suggested) namespace or prefix that gnome
> >> shell extensions should place their conf keys within, or shall I just
> >> make something up? Should I put it inside
> >> org.gnome.shell.extensions.<extension-id> or something?
> >
> > Currently, extensions that use GSettings use
> > "org.gnome.shell.extensions.<extension-id>" and
> > "/org/gnome/shell/extensions/<extension-id>", yes. I think you can
> > follow that prefix, if you plan to have it hosted by
> > gnome-shell-extensions GIT.
> > Otherwise, it is better to use your own ID (like
> > org.project.YourExtension and /org/project/YourExtension), to avoid
> > clobbering namespaces you don't own.
> 
> It seems that either
> (1) extension IDs should be unique (regardless of how they are distributed), 
> or
> (2) there could be a nested namespace, e.g
> org.gnome.shell.extensions.net.gfxmonk.whatever.

Extension UUIDs, as the name says, should be namespaced and unique, or
you get filesystem conficlts. Extensions short ids (that is, the
directory names in gnome-shell-extensions) on the other hand need not be
unique with whatever other people can invent, as they're suffixed with
"@gnome-shell-extensions.gnome.org", and similarly the GSettings schema
is prefixed with "org.gnome.shell.extensions".
Other projects, or individual extension developer, don't have the
concept of "extension short id" (because they don't use the same
Automake magic I do), so this does not apply.
And similarly, they don't own or control "org.gnome.shell.extensions",
are not endorsed by the gnome project, and therefore should not use
"org.gnome.shell.extensions" as a prefix for their schemas and
"@gnome-shell-extensions.gnome.org" as a suffix for their UUIDS.

> I assumed that (1) was the case.
> 
> > Giovanni
> >
> > PS: note that extensions with GSettings must be installed system-wide,
> > so you'd better have them in gnome-shell-extensions repo, so they're
> > picked up by distribution packages.
> 
> Really? can I ask what the reason for this is? I am personally a
> pretty big fan of *not* installing things system-wide, but would still
> like to use GSettings...

Why not installing system-wide? It's just a matter of "pkcon install
gnome-shell-extensions-foo" after all, and it ensures you're running the
stable version on the stable shell, without hacks or dangerous env vars.

Giovanni

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

_______________________________________________
gnome-shell-list mailing list
gnome-shell-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-shell-list

Reply via email to