[yelp] [yelp-application] Use keyfile backend of GSettings if none other specified
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [yelp-application] Use keyfile backend of GSettings if none other specified
- Date: Fri, 23 Apr 2010 20:21:49 +0000 (UTC)
commit bad11fa3b085c6562a0ca4f28e963b2c02260528
Author: Shaun McCance <shaunm gnome org>
Date: Thu Apr 22 06:03:23 2010 -0500
[yelp-application] Use keyfile backend of GSettings if none other specified
src/yelp-application.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/yelp-application.c b/src/yelp-application.c
index 6693199..b1ace48 100644
--- a/src/yelp-application.c
+++ b/src/yelp-application.c
@@ -88,7 +88,18 @@ yelp_application_init (YelpApplication *app)
g_str_equal,
g_free,
NULL);
- priv->gsettings = g_settings_new ("org.gnome.yelp");
+ /* FIXME: is there a better way to see if there's a real backend in use? */
+ if (g_getenv ("GSETTINGS_BACKEND") == NULL) {
+ gchar *keyfile = g_build_filename (g_get_user_config_dir (),
+ "yelp", "yelp.cfg",
+ NULL);
+ g_settings_backend_setup_keyfile ("yelp-", keyfile);
+ priv->gsettings = g_settings_new_with_context ("org.gnome.yelp", "yelp-");
+ g_free (keyfile);
+ }
+ else {
+ priv->gsettings = g_settings_new ("org.gnome.yelp");
+ }
g_settings_bind (priv->gsettings, "show-cursor",
settings, "show-text-cursor",
G_SETTINGS_BIND_DEFAULT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]