Re: GSettings and you

On Thu, 2010-04-22 at 09:27 -0400, Matthias Clasen wrote:
> On Thu, Apr 22, 2010 at 8:03 AM, Rodrigo Moya <rodrigo gnome-db org> wrote:
> > On Tue, 2010-04-20 at 11:04 -0400, Matthias Clasen wrote:
> >> On Tue, Apr 20, 2010 at 10:50 AM, Xavier Claessens <xclaesse gmail com> wrote:
> >> > Nice. Just a question: where can I find the code for the "Several fully
> >> > functional backends"? Especially the gconf one.
> >> >
> >>
> >> The gconf backend is included in GConf 2.31.1.
> >> GLib 2.25.1 includes a memory backend, a keyfile backend and a 'null' backend.
> >>
> > and how do you write/install/setup other backends? I see you must
> > implement the GSettingsBackend class, but how can you set it up so that
> > all calls to gsettings_* API use it? Via the env var?
> >
> To write your own backend (which I don't think you really want to
> do...), you implement GSettingsBackend. To use, you can either bind it
> to a special context (similar to what I explained for the keyfile
> backend), via
> g_settings_backend_setup ("blah", backend)
> Or you can make your backend implement the "gsettings-backend"
> extension point (and possibly build it as a GIO module and install it
> in /usr/lib/gio/modules). If you do that, GSettings will consider your
> backend like any other when looking for the default. And you can
> influence the choice of the default backend by setting the
that's what I'd prefer, since my backend would be a couchdb-based one,
so you could just choose it as default and get all settings synchronized
to other couchdb instances. Thanks for the info, but I'm sure I'll keep
asking more questions on IRC :D

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