Re: GSettings and you



On Wed, Apr 21, 2010 at 3:24 PM, Matthias Clasen
<matthias clasen gmail com> wrote:
> On Wed, Apr 21, 2010 at 6:04 PM, Shaun McCance
>
>> How do I use the keyfile backend? 'export GSETTINGS_BACKEND=keyfile'
>> gives me this:
>>
>> Can't find GSettings backend 'keyfile' given in GSETTINGS_BACKEND
>> environment variable
>>
>> I don't have anything under $libdir/gio/modules. Did I miss something?
>
> The keyfile backend is built in, that is why it doesn't show up in the
> modules dir. But it is not really meant to be used in that 'global'
> fashion by setting the env var. Instead, you can use it for selected
> schemas, by doing the following:
>
> g_settings_backend_setup_keyfile ("blah", filename);
> settings = g_settings_new_with_context ("org.bla.bla", "blah");
>
> After that, settings that you get or set with that settings object
> will be backed by the keyfile named filename. Note that you still need
> to have an installed schema for "org.bla.bla".

Is the intent of the keyfile backend (at least, in a typical GNOME
desktop) to have us store application state separate from settings?

Sandy


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