[nautilus-actions] Test versions when converting parameters



commit 6d974c0093bc15294c52e368e7e497ad243da18e
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon May 17 05:14:29 2010 +0200

    Test versions when converting parameters

 ChangeLog                           |    6 ++++++
 TODO                                |    2 ++
 src/core/na-object-action-factory.c |    2 +-
 src/io-gconf/nagp-reader.c          |    3 +++
 4 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ad99745..9aced24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,12 @@
 	* src/utils/nautilus-actions-run.c:
 	Mark two new strings for translation.
 
+	* src/core/na-object-action-factory.c:
+	No more set a string version.
+
+	* src/io-gconf/nagp-reader.c (read_done_profile_attach_profile):
+	Test both string and integer versions.
+
 2010-05-12 Pierre Wieser <pwieser trychlos org>
 
 	* src/api/na-icontext.h:
diff --git a/TODO b/TODO
index 6073e51..49d6c9d 100644
--- a/TODO
+++ b/TODO
@@ -455,3 +455,5 @@ Parameter 	Description
 %X 	space-separated list of extensions
 %% 	the « % » character
 
+- bug: nact 2.30.2: creating a new action, saving -> makes other actions modified !
+- bug: nact 2.30.2: action pre 1.4.1 has several profiles
diff --git a/src/core/na-object-action-factory.c b/src/core/na-object-action-factory.c
index d271206..6579f29 100644
--- a/src/core/na-object-action-factory.c
+++ b/src/core/na-object-action-factory.c
@@ -56,7 +56,7 @@ static NADataDef data_def_action [] = {
 				"Version of the format",
 				"The version of the configuration format that will be used to manage backward compatibility.",
 				NAFD_TYPE_STRING,
-				"2.0",
+				NULL,
 				TRUE,
 				TRUE,
 				FALSE,
diff --git a/src/io-gconf/nagp-reader.c b/src/io-gconf/nagp-reader.c
index 626e17c..398796c 100644
--- a/src/io-gconf/nagp-reader.c
+++ b/src/io-gconf/nagp-reader.c
@@ -318,6 +318,7 @@ static void
 read_done_profile_attach_profile( const NAIFactoryProvider *provider, NAObjectProfile *profile, ReaderData *data, GSList **messages )
 {
 	guint iversion;
+	gchar *version;
 
 	g_debug( "nagp_reader_read_done_attach_profile: profile=%p", ( void * ) profile );
 
@@ -325,7 +326,9 @@ read_done_profile_attach_profile( const NAIFactoryProvider *provider, NAObjectPr
 
 	/* converts pre-v3 parameters
 	 */
+	version = na_object_get_version( data->parent );
 	iversion = na_object_get_iversion( data->parent );
+	g_debug( "nagp_reader_read_done_attach_profile: version=%s, iversion=%d", version, iversion );
 	if( iversion < 3 ){
 		convert_pre_v3_parameters( profile );
 	}



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