[gnome-utils/gsettings-tutorial: 2/22] [gsettings-tutorial] Make the application use the gconf backend



commit 6db37bf44daa7e2d9163dd98cdc0ef623d0efac0
Author: Vincent Untz <vuntz gnome org>
Date:   Fri Apr 16 15:43:00 2010 -0400

    [gsettings-tutorial] Make the application use the gconf backend
    
    To have a smooth migration for the code, we want to have GSettings and
    gconf coexist during the port. There's a GSettings backend that uses
    gconf for storage. This makes it possible to have one part of the code
    using GSettings while still allowing another part of the code to use
    gconf for the same key.
    
    A few notes:
    
      + This backend is only available in gconf >= 2.31.1.
    
      + This should be removed once the port is over and migration to the
        default GSettings backend is ready.
    
      + GSettings won't work unless there's a schema installed for the
        settings that will get accessed.

 baobab/src/baobab.c |    2 ++
 configure.ac        |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c
index a16bbd1..18c9e7c 100644
--- a/baobab/src/baobab.c
+++ b/baobab/src/baobab.c
@@ -1096,6 +1096,8 @@ main (int argc, char *argv[])
 	GOptionContext *context;
 	GError *error = NULL;
 
+	g_setenv ("GSETTINGS_BACKEND", "gconf", FALSE);
+
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
diff --git a/configure.ac b/configure.ac
index 089248a..76c6fad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,7 @@ dnl pkg-config check
 
 GLIB_REQUIRED=2.20.0
 GIO_REQUIRED=2.25.0
+GCONF_REQUIRED=2.31.1
 GTK_REQUIRED=2.18.0
 GIO_UNIX_REQUIRED=2.18.0
 LIBPANEL_APPLET_REQUIRED=2.13.4
@@ -77,9 +78,9 @@ LIBGTOP_REQUIRED=2.12.0
 LIBCANBERRA_GTK_REQUIRED=0.4
 
 # common checks
-PKG_CHECK_MODULES(GNOME_UTILS, glib-2.0 >= $GLIB_REQUIRED dnl
-                               gio-2.0 >= $GIO_REQUIRED   dnl
-                               gconf-2.0                  dnl
+PKG_CHECK_MODULES(GNOME_UTILS, glib-2.0 >= $GLIB_REQUIRED   dnl
+                               gio-2.0 >= $GIO_REQUIRED     dnl
+                               gconf-2.0 >= $GCONF_REQUIRED dnl
                                gtk+-2.0 >= $GTK_REQUIRED)
 AC_SUBST(GNOME_UTILS_CFLAGS)
 AC_SUBST(GNOME_UTILS_LIBS)



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