[gnome-settings-daemon] gconf: Integrate into the build, disabled by default



commit 06f326c5fb4d2647798c1116ee11ba97a0549c79
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Fri Oct 22 16:00:56 2010 +0200

    gconf: Integrate into the build, disabled by default

 configure.ac                      |   17 +++++-----
 plugins/Makefile.am               |    2 +-
 plugins/gconf/Makefile.am         |    2 +-
 plugins/gconf/gsd-gconf-manager.c |   62 +++++++++++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6d791d2..c9d5936 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,6 @@ EXTRA_COMPILE_WARNINGS(yes)
 PKG_CHECK_MODULES(SETTINGS_DAEMON,
         glib-2.0 >= $GLIB_REQUIRED_VERSION
         gtk+-3.0 >= $GTK_REQUIRED_VERSION
-        gconf-2.0 >= $GCONF_REQUIRED_VERSION
 	gio-2.0 >= $GIO_REQUIRED_VERSION
         gmodule-2.0
         gthread-2.0
@@ -225,8 +224,9 @@ AC_SUBST(GIOUNIX_CFLAGS)
 AC_SUBST(GIOUNIX_LIBS)
 
 dnl ---------------------------------------------------------------------------
-dnl - GConf<->Gsettings bridge
+dnl - GConf<->GSettings bridge
 dnl ---------------------------------------------------------------------------
+
 build_gconf_bridge=false
 AC_ARG_ENABLE(gconf-bridge,
   AC_HELP_STRING([--disable-gconf-bridge],
@@ -235,17 +235,16 @@ AC_ARG_ENABLE(gconf-bridge,
               yes) WANT_GCONF_BRIDGE=yes ;;
 	      no) WANT_GCONF_BRIDGE=no ;;
 	      *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf-bridge) ;;
-      [esac],
+      esac],
       [WANT_GCONF_BRIDGE=no]) dnl Default value
 
 if test x$WANT_GCONF_BRIDGE = xyes; then
-      GCONF_REQUIRED_VERSION=2.6.1
-      PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED_VERSION,
-            [have_gconf=true
+      PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.1,
+            [build_gconf_bridge=true
              AC_DEFINE(BUILD_GCONF_BRIDGE, 1, [Define if GConf bridge should be built])],
-	    [have_gconf=false])
+	    [build_gconf_bridge=false])
 fi
-AM_CONDITIONAL(BUILD_GCONF_BRIDGE, test "x$have_gconf" = "xtrue")
+AM_CONDITIONAL(BUILD_GCONF_BRIDGE, test "x$build_gconf_bridge" = "xtrue")
 
 AC_SUBST(GCONF_CFLAGS)
 AC_SUBST(GCONF_LIBS)
@@ -511,7 +510,7 @@ echo "
         Libnotify support:        ${have_libnotify}
         PulseAudio support:       ${have_pulse}
         Smartcard support:        ${have_smartcard_support}
-	GConf bridge support:     ${have_gconf}
+	GConf bridge support:     ${build_gconf_bridge}
 ${NSS_DATABASE:+\
         System nssdb:             ${NSS_DATABASE}
 }\
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 78cd83e..3107cf4 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -23,7 +23,7 @@ if BUILD_GCONF_BRIDGE
 enabled_plugins += gconf
 else
 disabled_plugins += gconf
-fi
+endif
 
 if SMARTCARD_SUPPORT
 enabled_plugins += smartcard
diff --git a/plugins/gconf/Makefile.am b/plugins/gconf/Makefile.am
index 0401361..550a62c 100644
--- a/plugins/gconf/Makefile.am
+++ b/plugins/gconf/Makefile.am
@@ -25,7 +25,7 @@ libgconf_la_LIBADD =		\
 
 plugin_in_files = gconf.gnome-settings-plugin.in
 
-plugins_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
+plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
 
 EXTRA_DIST = $(plugin_in_files)
 CLEANFILES = $(plugin_DATA)
diff --git a/plugins/gconf/gsd-gconf-manager.c b/plugins/gconf/gsd-gconf-manager.c
index 7d760eb..dc0924f 100644
--- a/plugins/gconf/gsd-gconf-manager.c
+++ b/plugins/gconf/gsd-gconf-manager.c
@@ -17,3 +17,65 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  */
+
+#include "config.h"
+#include "gsd-gconf-manager.h"
+
+#define GSD_GCONF_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_GCONF_MANAGER, GsdGconfManagerPrivate))
+
+struct GsdGconfManagerPrivate {
+};
+
+GsdGconfManager *manager_object = NULL;
+
+G_DEFINE_TYPE(GsdGconfManager, gsd_gconf_manager, G_TYPE_OBJECT)
+
+static void
+gsd_gconf_manager_finalize (GObject *object)
+{
+	GsdGconfManager *manager = GSD_GCONF_MANAGER (object);
+
+	g_return_if_fail (manager->priv != NULL);
+
+	G_OBJECT_CLASS (gsd_gconf_manager_parent_class)->finalize (object);
+}
+
+static void
+gsd_gconf_manager_class_init (GsdGconfManagerClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	object_class->finalize = gsd_gconf_manager_finalize;
+
+	g_type_class_add_private (klass, sizeof (GsdGconfManagerPrivate));
+}
+
+static void
+gsd_gconf_manager_init (GsdGconfManager *manager)
+{
+	manager->priv = GSD_GCONF_MANAGER_GET_PRIVATE (manager);
+}
+
+GsdGconfManager *
+gsd_gconf_manager_new (void)
+{
+	if (manager_object != NULL) {
+		g_object_ref (manager_object);
+	} else {
+		manager_object = g_object_new (GSD_TYPE_GCONF_MANAGER, NULL);
+		g_object_add_weak_pointer (manager_object,
+					   (gpointer *) &manager_object);
+	}
+
+	return manager_object;
+}
+
+gboolean
+gsd_gconf_manager_start (GsdGconfManager *manager, GError **error)
+{
+}
+
+void
+gsd_gconf_manager_stop (GsdGconfManager *manager)
+{
+}



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