[nautilus-actions] Explicitely write the numeric version to GConf



commit 1f99a37b1d8c58fd4c3a3c75b3c38539df324884
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Jun 18 12:01:52 2010 +0200

    Explicitely write the numeric version to GConf

 ChangeLog                         |    7 +++++++
 src/core/na-object-item-factory.c |    2 +-
 src/io-gconf/nagp-keys.h          |    2 ++
 src/io-gconf/nagp-writer.c        |    8 +++++++-
 4 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3639b71..e79e371 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 2010-06-18 Pierre Wieser <pwieser trychlos org>
 
 	* src/core/na-object-item-factory.c:
+	Numeric version is no more writable by default.
+
+	* src/io-gconf/nagp-keys.h:
+	* src/io-gconf/nagp-writer.c (nagp_writer_write_start):
+	Explicitely write the numeric version to GConf.
+
+	* src/core/na-object-item-factory.c:
 	Provider data is no more duplicable by NAObjectFactory.
 
 	* src/core/na-object-item.c (object_copy):
diff --git a/src/core/na-object-item-factory.c b/src/core/na-object-item-factory.c
index 71e43d0..eb7bef1 100644
--- a/src/core/na-object-item-factory.c
+++ b/src/core/na-object-item-factory.c
@@ -376,7 +376,7 @@ NADataDef data_def_item [] = {
 				N_( "The version of the configuration format that will be used to manage backward compatibility." ),
 				NAFD_TYPE_UINT,
 				"3",
-				TRUE,
+				FALSE,
 				TRUE,
 				TRUE,
 				FALSE,
diff --git a/src/io-gconf/nagp-keys.h b/src/io-gconf/nagp-keys.h
index 046e71b..c88e012 100644
--- a/src/io-gconf/nagp-keys.h
+++ b/src/io-gconf/nagp-keys.h
@@ -38,4 +38,6 @@
 #define NAGP_VALUE_TYPE_MENU			"Menu"
 #define NAGP_VALUE_TYPE_ACTION			"Action"
 
+#define NAGP_ENTRY_IVERSION				"iversion"
+
 #endif /* __NAGP_GCONF_PROVIDER_KEYS_H__ */
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 6fc9137..79a6c14 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -226,15 +226,21 @@ nagp_writer_write_start( const NAIFactoryProvider *writer, void *writer_data,
 	GConfClient *gconf;
 	gchar *id;
 	gchar *path;
+	guint iversion;
 
 	if( NA_IS_OBJECT_ITEM( object )){
 		id = na_object_get_id( object );
-		path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_TYPE );
 		gconf = NAGP_GCONF_PROVIDER( writer )->private->gconf;
 
+		path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_TYPE );
 		na_gconf_utils_write_string( gconf, path, NA_IS_OBJECT_ACTION( object ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU, NULL );
+		g_free( path );
 
+		path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_IVERSION );
+		iversion = na_object_get_iversion( object );
+		na_gconf_utils_write_int( gconf, path, iversion, NULL );
 		g_free( path );
+
 		g_free( id );
 	}
 



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