diff options
author | Shaun McCance <shaunm@gnome.org> | 2011-04-06 21:12:20 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2011-04-06 21:12:20 -0400 |
commit | cbb276aa90589cfc72f75e4414607590d21b6ca6 (patch) | |
tree | a6f3242f2fa047ebe2b2c1c93cdda73c588fd2f3 /src/yelp-application.c | |
parent | 6ee2ff5e637fa191f2434629baeed6be66bd4efb (diff) | |
download | yelp-cbb276aa90589cfc72f75e4414607590d21b6ca6.tar.gz |
yelp-application.c: Actually use dconf, except per-document
Diffstat (limited to 'src/yelp-application.c')
-rw-r--r-- | src/yelp-application.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/yelp-application.c b/src/yelp-application.c index 7e143afa..dfb528ad 100644 --- a/src/yelp-application.c +++ b/src/yelp-application.c @@ -222,25 +222,22 @@ application_setup (YelpApplication *app) { YelpApplicationPrivate *priv = GET_PRIV (app); YelpSettings *settings = yelp_settings_get_default (); + gchar *keyfile; GtkAction *action; priv->windows_by_document = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - /* 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); - priv->backend = g_keyfile_settings_backend_new (keyfile, "/org/gnome/yelp/", "yelp"); - priv->gsettings = g_settings_new_with_backend ("org.gnome.yelp", - priv->backend); - g_free (keyfile); - } - else { - priv->gsettings = g_settings_new ("org.gnome.yelp"); - } + /* Use a config file for per-document settings, because + Ryan asked me to. */ + keyfile = g_build_filename (g_get_user_config_dir (), + "yelp", "yelp.cfg", NULL); + priv->backend = g_keyfile_settings_backend_new (keyfile, "/org/gnome/yelp/", "yelp"); + g_free (keyfile); + /* But the main settings are in dconf */ + priv->gsettings = g_settings_new ("org.gnome.yelp"); + g_settings_bind (priv->gsettings, "show-cursor", settings, "show-text-cursor", G_SETTINGS_BIND_DEFAULT); |