[Xfce4-commits] [apps/mousepad] 04/45: Use DConf (or whatever the default) when DBus support is enabled
noreply at xfce.org
noreply at xfce.org
Fri Jul 11 13:03:09 CEST 2014
This is an automated email from the git hooks/post-receive script.
mbrush pushed a commit to branch master
in repository apps/mousepad.
commit 97c0b8b5d50a2285dab3e835c7bd499aa299e204
Author: Matthew Brush <mbrush at codebrainz.ca>
Date: Sun Jul 6 03:05:46 2014 -0700
Use DConf (or whatever the default) when DBus support is enabled
Instead of explicitly using keyfile backend
---
mousepad/Makefile.am | 3 ++-
mousepad/mousepad-settings.c | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am
index b8bdf28..8c6a235 100644
--- a/mousepad/Makefile.am
+++ b/mousepad/Makefile.am
@@ -80,7 +80,8 @@ mousepad_dbus_sources = \
mousepad_CFLAGS += \
-DDBUS_API_SUBJECT_TO_CHANGE \
- $(DBUS_CFLAGS)
+ $(DBUS_CFLAGS) \
+ -DMOUSEPAD_GSETTINGS_USE_DBUS=1
mousepad_LDADD += \
$(DBUS_LIBS)
diff --git a/mousepad/mousepad-settings.c b/mousepad/mousepad-settings.c
index 678a579..64035e4 100644
--- a/mousepad/mousepad-settings.c
+++ b/mousepad/mousepad-settings.c
@@ -120,13 +120,15 @@ mousepad_settings_get_default (void)
if (g_once_init_enter (&default_initialized))
{
- gchar *conf_file;
GSettingsBackend *backend;
/* If we're installed in an unusual location, we still want to load
* the schema so enforce this with the relevant environment variable. */
mousepad_settings_update_gsettings_schema_dir ();
+#ifndef MOUSEPAD_GSETTINGS_USE_DBUS
+ gchar *conf_file;
+
/* Path inside user's config directory */
conf_file = g_build_filename (g_get_user_config_dir (),
"mousepad",
@@ -136,6 +138,9 @@ mousepad_settings_get_default (void)
/* Always use the keyfile backend */
backend = g_keyfile_settings_backend_new (conf_file, "/", NULL);
g_free (conf_file);
+#else
+ backend = g_settings_backend_get_default ();
+#endif
/* Construct the singleton instance */
default_settings = g_object_new (
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list