Re: GSettings and you
- From: Matthias Clasen <matthias clasen gmail com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: desktop-devel-list gnome org
- Subject: Re: GSettings and you
- Date: Thu, 22 Apr 2010 09:27:56 -0400
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
GSETTINGS_BACKEND env var.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]