Ho to use keyfile backend with GSettings?



Hello!

I'm trying to make GSettings to work with temporal key file, sample code:


#define G_SETTINGS_ENABLE_BACKEND 1
#include <gio/gsettingsbackend.h>

// ... code...

GSettingsBackend* settings_backend;

settings_backend = g_keyfile_settings_backend_new ("tmp.cfg", "/", NULL);
this->root_settings = g_settings_new_with_backend_and_path ("org.app.test",
settings_backend, "/org/app/test/");

// ... code....


and my key file:

[/org/app/test]

[/org/app/test/general]
home=""
space=4

When I run my application it always fails with message: GLib-GIO-CRITICAL
**: Settings schema 'org.app.test' is not installed

What am I doing wrong?



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