[nautilus-actions] Fix compilation
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix compilation
- Date: Wed, 19 Jan 2011 21:47:30 +0000 (UTC)
commit a8ec4af0fcef6487c55fd2252e35c022385744e3
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 2 21:57:50 2011 +0100
Fix compilation
For now, the recursive deletion of migrated branches is disabled.
configure.ac | 3 ++-
src/core/na-gsettings-migrate.c | 26 +++++++++++++++++++++++---
src/core/na-pivot.c | 4 ++--
3 files changed, 27 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index db2614b..8799b35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,7 +156,8 @@ AC_SUBST([NAUTILUS_ACTIONS_LIBS])
AC_MSG_CHECKING([for GSettings])
PKG_CHECK_EXISTS([glib-2.0 >= 2.26],[have_gsettings="yes"],[have_gsettings="no"])
AC_MSG_RESULT([${have_gsettings}])
-AC_DEFINE_UNQUOTED([HAVE_GSETTINGS],[ test "x${have_gsettings}" = "xyes"],[Whether we compile against a recent enough GIO])
+if test "x${have_gsettings}" = "xyes"; then have_gsettings_b=1; else have_gsettings_b=0; fi
+AC_DEFINE_UNQUOTED([HAVE_GSETTINGS],[${have_gsettings_b}],[Whether we compile against a recent enough GIO])
# As of N-A 3.0.6, GConf is always enabled
AM_CONDITIONAL([HAVE_GSETTINGS_AND_GCONF], [test "x${have_gsettings}" = "xyes"])
diff --git a/src/core/na-gsettings-migrate.c b/src/core/na-gsettings-migrate.c
index 17a77c7..9432717 100644
--- a/src/core/na-gsettings-migrate.c
+++ b/src/core/na-gsettings-migrate.c
@@ -32,7 +32,14 @@
#include <config.h>
#endif
+#include <gconf/gconf-client.h>
+#include <string.h>
+
+#include <api/na-core-utils.h>
+#include <api/na-gconf-utils.h>
+
#include "na-gsettings-migrate.h"
+#include "na-iprefs.h"
static void migrate_configurations( const NAPivot *pivot, GConfClient *gconf );
static void migrate_io_providers( const NAPivot *pivot, GConfClient *gconf );
@@ -45,12 +52,13 @@ static void migrate_preferences( const NAPivot *pivot, GConfClient *gconf );
* already done.
*/
void
-na_pivot_gsettings_migrate( const NAPivot *pivot )
+na_gsettings_migrate( const NAPivot *pivot )
{
- static const gchar *thisfn = "na_pivot_gsettings_migrate";
+ static const gchar *thisfn = "na_gsettings_migrate";
GConfClient *gconf_client;
GSList *root, *ir;
- const gchar *bname;
+ gchar *bname;
+ GError *error;
gconf_client = gconf_client_get_default();
if( !gconf_client ){
@@ -81,6 +89,15 @@ na_pivot_gsettings_migrate( const NAPivot *pivot )
g_warning( "%s: unknown branch: %s", thisfn, branch );
}
+ error = NULL;
+ /*
+ gconf_client_recursive_unset( gconf_client, branch, GCONF_UNSET_INCLUDING_SCHEMA_NAMES, &error );
+ */
+ if( error ){
+ g_warning( "%s: branch=%s, error=%s", thisfn, branch, error->message );
+ g_error_free( error );
+ }
+
g_free( bname );
}
@@ -90,6 +107,9 @@ na_pivot_gsettings_migrate( const NAPivot *pivot )
g_object_unref( gconf_client );
}
+/*
+ * each found configurations is recreated as a .desktop file
+ */
static void
migrate_configurations( const NAPivot *pivot, GConfClient *gconf )
{
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index dce44c7..a8d5e54 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -43,7 +43,7 @@
#include "na-module.h"
#include "na-pivot.h"
-#ifdef HAVE_GSETTINGS && HAVE_GCONF
+#if HAVE_GSETTINGS && HAVE_GCONF
#include "na-gsettings-migrate.h"
#endif
@@ -239,7 +239,7 @@ instance_constructed( GObject *object )
self->private->modules = na_module_load_modules();
-#ifdef HAVE_GSETTINGS && HAVE_GCONF
+#if HAVE_GSETTINGS && HAVE_GCONF
na_gsettings_migrate( self );
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]