[nautilus-actions] na_iprefs_write_string_list: returns a writing status



commit 71f171cd97e95b1c0d4d900ab5b85cdec137b369
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Dec 13 06:49:42 2010 +0100

    na_iprefs_write_string_list: returns a writing status

 ChangeLog            |    4 ++++
 src/core/na-iprefs.c |   12 +++++++++---
 src/core/na-iprefs.h |    2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7b9ace9..ad1ade2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-12-13 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-iprefs.c:
+	* src/core/na-iprefs.h (na_iprefs_write_string_list):
+	Returns a writing status.
+
 	* Makefile.am:
 	* run-autogen.sh: Ask for PDF generation of the reference manual.
 
diff --git a/src/core/na-iprefs.c b/src/core/na-iprefs.c
index 9de3770..799b213 100644
--- a/src/core/na-iprefs.c
+++ b/src/core/na-iprefs.c
@@ -452,18 +452,24 @@ write_string( NAIPrefs *instance, const gchar *name, const gchar *value )
  * @value: the value to be written.
  *
  * Writes the value as the given GConf preference.
+ *
+ * Returns: %TRUE if the string list has been successfully written,
+ *  %FALSE else.
  */
-void
+gboolean
 na_iprefs_write_string_list( const NAIPrefs *instance, const gchar *key, GSList *value )
 {
+	gboolean ret = FALSE;
 	gchar *path;
 
-	g_return_if_fail( NA_IS_IPREFS( instance ));
+	g_return_if_fail( NA_IS_IPREFS( instance ), FALSE );
 
 	if( st_initialized && !st_finalized ){
 
 		path = gconf_concat_dir_and_key( IPREFS_GCONF_PREFS_PATH, key );
-		na_gconf_utils_write_string_list( na_iprefs_get_gconf_client( instance ), path, value, NULL );
+		ret = na_gconf_utils_write_string_list( na_iprefs_get_gconf_client( instance ), path, value, NULL );
 		g_free( path );
 	}
+
+	return( ret );
 }
diff --git a/src/core/na-iprefs.h b/src/core/na-iprefs.h
index 6e13c33..dfbb2b7 100644
--- a/src/core/na-iprefs.h
+++ b/src/core/na-iprefs.h
@@ -132,7 +132,7 @@ gchar       *na_iprefs_read_string      ( const NAIPrefs *instance, const gchar
 GSList      *na_iprefs_read_string_list ( const NAIPrefs *instance, const gchar *key, const gchar *default_value );
 guint        na_iprefs_read_uint        ( const NAIPrefs *instance, const gchar *key, guint defaut_value );
 
-void         na_iprefs_write_string_list( const NAIPrefs *instance, const gchar *key, GSList *value );
+gboolean     na_iprefs_write_string_list( const NAIPrefs *instance, const gchar *key, GSList *value );
 
 G_END_DECLS
 



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