[nautilus-actions] Refactoring: update src/core/na-iprefs.{c,h}



commit a9818dabff6bd52e96353f40130484a6c98ce249
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Feb 15 20:18:08 2010 +0100

    Refactoring: update src/core/na-iprefs.{c,h}

 ChangeLog            |    1 +
 src/core/na-iprefs.c |  275 ++++++++++++++++----------------------------------
 src/core/na-iprefs.h |   58 ++++-------
 3 files changed, 107 insertions(+), 227 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 818e4fe..5f24ce4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-02-15 Pierre Wieser <pwieser trychlos org>
 
+	Update src/core/na-iprefs.{c,h}
 	Update src/core/na-ipivot-consumer.{c,h}
 	Update src/core/na-io-factory.{c,h}
 	Update src/core/na-io-provider.{c,h}
diff --git a/src/core/na-iprefs.c b/src/core/na-iprefs.c
index 33c8884..eb32e7f 100644
--- a/src/core/na-iprefs.c
+++ b/src/core/na-iprefs.c
@@ -32,57 +32,29 @@
 #include <config.h>
 #endif
 
-#include "na-gconf-utils.h"
+#include <api/na-gconf-utils.h>
+
 #include "na-iprefs.h"
 
 /* private interface data
  */
 struct NAIPrefsInterfacePrivate {
-	void *empty;						/* so that gcc -pedantic is happy */
+	GConfClient *gconf;
 };
 
-/* private data initialized the first time an instance calls a function
- * of the public api
- * it is set as a data association against the calling GObject
- */
-typedef struct {
-	GConfClient *client;
-}
-	NAIPrefsPrivate;
-
-#define DEFAULT_ORDER_MODE_INT			IPREFS_ORDER_ALPHA_ASCENDING
-#define DEFAULT_ORDER_MODE_STR			"AscendingOrder"
+#define DEFAULT_ORDER_MODE_INT				IPREFS_ORDER_ALPHA_ASCENDING
+#define DEFAULT_ORDER_MODE_STR				"AscendingOrder"
 
 static GConfEnumStringPair order_mode_table[] = {
-	{ IPREFS_ORDER_ALPHA_ASCENDING ,	"AscendingOrder" },
-	{ IPREFS_ORDER_ALPHA_DESCENDING,	"DescendingOrder" },
-	{ IPREFS_ORDER_MANUAL          ,	"ManualOrder" },
+	{ IPREFS_ORDER_ALPHA_ASCENDING ,		"AscendingOrder" },
+	{ IPREFS_ORDER_ALPHA_DESCENDING,		"DescendingOrder" },
+	{ IPREFS_ORDER_MANUAL          ,		"ManualOrder" },
 	{ 0, NULL }
 };
 
-#define NA_IPREFS_PRIVATE_DATA			"na-runtime-iprefs-private-data"
-
-#define DEFAULT_IMPORT_MODE_INT				IPREFS_IMPORT_NO_IMPORT
-#define DEFAULT_IMPORT_MODE_STR				"NoImport"
-
-static GConfEnumStringPair import_mode_table[] = {
-	{ IPREFS_IMPORT_NO_IMPORT,				DEFAULT_IMPORT_MODE_STR },
-	{ IPREFS_IMPORT_RENUMBER,				"Renumber" },
-	{ IPREFS_IMPORT_OVERRIDE,				"Override" },
-	{ IPREFS_IMPORT_ASK,					"Ask" },
-	{ 0, NULL }
-};
-
-#define DEFAULT_EXPORT_FORMAT_INT			IPREFS_EXPORT_FORMAT_GCONF_ENTRY
-#define DEFAULT_EXPORT_FORMAT_STR			"GConfEntry"
-
-static GConfEnumStringPair export_format_table[] = {
-	{ IPREFS_EXPORT_FORMAT_GCONF_SCHEMA_V1,	"GConfSchemaV1" },
-	{ IPREFS_EXPORT_FORMAT_GCONF_SCHEMA_V2,	"GConfSchemaV2" },
-	{ IPREFS_EXPORT_FORMAT_GCONF_ENTRY,		DEFAULT_EXPORT_FORMAT_STR },
-	{ IPREFS_EXPORT_FORMAT_ASK,				"Ask" },
-	{ 0, NULL }
-};
+#if 0
+#define NA_IPREFS_PRIVATE_DATA				"na-runtime-iprefs-private-data"
+#endif
 
 static gboolean st_initialized = FALSE;
 static gboolean st_finalized = FALSE;
@@ -91,9 +63,11 @@ static GType       register_type( void );
 static void        interface_base_init( NAIPrefsInterface *klass );
 static void        interface_base_finalize( NAIPrefsInterface *klass );
 
-static void        setup_private_data( NAIPrefs *instance );
+#if 0
+static void        setup_private_data( const NAIPrefs *instance );
 static GConfValue *get_value( GConfClient *client, const gchar *path, const gchar *entry );
 static void        set_value( GConfClient *client, const gchar *path, const gchar *entry, GConfValue *value );
+#endif
 
 GType
 na_iprefs_get_type( void )
@@ -139,12 +113,14 @@ interface_base_init( NAIPrefsInterface *klass )
 {
 	static const gchar *thisfn = "na_iprefs_interface_base_init";
 
-	if( !st_initialized ){
+	if( st_initialized && !st_initialized ){
 
 		g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
 
 		klass->private = g_new0( NAIPrefsInterfacePrivate, 1 );
 
+		klass->private->gconf = gconf_client_get_default();
+
 		st_initialized = TRUE;
 	}
 }
@@ -156,9 +132,11 @@ interface_base_finalize( NAIPrefsInterface *klass )
 
 	if( !st_finalized ){
 
+		g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
+
 		st_finalized = TRUE;
 
-		g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
+		g_object_unref( klass->private->gconf );
 
 		g_free( klass->private );
 	}
@@ -173,6 +151,7 @@ interface_base_finalize( NAIPrefsInterface *klass )
  *
  * The returned list should be na_utils_free_string_list() by the caller.
  */
+/*
 GSList *
 na_iprefs_get_level_zero_items( NAIPrefs *instance )
 {
@@ -189,6 +168,7 @@ na_iprefs_get_level_zero_items( NAIPrefs *instance )
 
 	return( level_zero );
 }
+*/
 
 /**
  * na_iprefs_set_level_zero_items:
@@ -197,6 +177,7 @@ na_iprefs_get_level_zero_items( NAIPrefs *instance )
  *
  * Writes the order and the content of the level-zero UUID's.
  */
+/*
 void
 na_iprefs_set_level_zero_items( NAIPrefs *instance, GSList *order )
 {
@@ -206,7 +187,7 @@ na_iprefs_set_level_zero_items( NAIPrefs *instance, GSList *order )
 
 		na_iprefs_write_string_list( instance, IPREFS_LEVEL_ZERO_ITEMS, order );
 	}
-}
+}*/
 
 /**
  * na_iprefs_get_order_mode:
@@ -254,6 +235,7 @@ na_iprefs_get_order_mode( NAIPrefs *instance )
  * Writes the current status of 'alphabetical order' to the GConf
  * preference system.
  */
+/*
 void
 na_iprefs_set_order_mode( NAIPrefs *instance, gint mode )
 {
@@ -270,7 +252,7 @@ na_iprefs_set_order_mode( NAIPrefs *instance, gint mode )
 				IPREFS_DISPLAY_ALPHABETICAL_ORDER,
 				order_str ? order_str : DEFAULT_ORDER_MODE_STR );
 	}
-}
+}*/
 
 /**
  * na_iprefs_should_add_about_item:
@@ -285,6 +267,7 @@ na_iprefs_set_order_mode( NAIPrefs *instance, gint mode )
  * Note: please take care of keeping the default value synchronized with
  * those defined in schemas.
  */
+#if 0
 gboolean
 na_iprefs_should_add_about_item( NAIPrefs *instance )
 {
@@ -299,6 +282,7 @@ na_iprefs_should_add_about_item( NAIPrefs *instance )
 
 	return( about );
 }
+#endif
 
 /**
  * na_iprefs_set_add_about_item:
@@ -307,6 +291,7 @@ na_iprefs_should_add_about_item( NAIPrefs *instance )
  *
  * Writes the new value to the GConf preference system.
  */
+/*
 void
 na_iprefs_set_add_about_item( NAIPrefs *instance, gboolean enabled )
 {
@@ -316,7 +301,7 @@ na_iprefs_set_add_about_item( NAIPrefs *instance, gboolean enabled )
 
 		na_iprefs_write_bool( instance, IPREFS_ADD_ABOUT_ITEM, enabled );
 	}
-}
+}*/
 
 /**
  * na_iprefs_should_create_root_menu:
@@ -331,6 +316,7 @@ na_iprefs_set_add_about_item( NAIPrefs *instance, gboolean enabled )
  * Note: please take care of keeping the default value synchronized with
  * those defined in schemas.
  */
+#if 0
 gboolean
 na_iprefs_should_create_root_menu( NAIPrefs *instance )
 {
@@ -345,6 +331,7 @@ na_iprefs_should_create_root_menu( NAIPrefs *instance )
 
 	return( create );
 }
+#endif
 
 /**
  * na_iprefs_set_create_root_menu:
@@ -353,6 +340,7 @@ na_iprefs_should_create_root_menu( NAIPrefs *instance )
  *
  * Writes the new value to the GConf preference system.
  */
+/*
 void
 na_iprefs_set_create_root_menu( NAIPrefs *instance, gboolean enabled )
 {
@@ -362,7 +350,7 @@ na_iprefs_set_create_root_menu( NAIPrefs *instance, gboolean enabled )
 
 		na_iprefs_write_bool( instance, IPREFS_CREATE_ROOT_MENU, enabled );
 	}
-}
+}*/
 
 /**
  * na_iprefs_get_gconf_client:
@@ -371,17 +359,20 @@ na_iprefs_set_create_root_menu( NAIPrefs *instance, gboolean enabled )
  * Returns: a GConfClient object.
  */
 GConfClient *
-na_iprefs_get_gconf_client( NAIPrefs *instance )
+na_iprefs_get_gconf_client( const NAIPrefs *instance )
 {
-	NAIPrefsPrivate *ipp;
+	GConfClient *client;
 
 	g_return_val_if_fail( NA_IS_IPREFS( instance ), NULL );
 
-	setup_private_data( instance );
-	ipp = ( NAIPrefsPrivate * ) g_object_get_data( G_OBJECT( instance ), NA_IPREFS_PRIVATE_DATA );
-	g_return_val_if_fail( ipp, NULL );
+	client = NULL;
 
-	return( ipp->client );
+	if( st_initialized && !st_finalized ){
+
+		client = NA_IPREFS_GET_INTERFACE( instance )->private->gconf;
+	}
+
+	return( client );
 }
 
 /**
@@ -395,16 +386,21 @@ na_iprefs_get_gconf_client( NAIPrefs *instance )
  * Returns: the boolean value.
  */
 gboolean
-na_iprefs_read_bool( NAIPrefs *instance, const gchar *name, gboolean default_value )
+na_iprefs_read_bool( const NAIPrefs *instance, const gchar *name, gboolean default_value )
 {
 	gchar *path;
 	gboolean ret;
 
 	g_return_val_if_fail( NA_IS_IPREFS( instance ), FALSE );
 
-	path = gconf_concat_dir_and_key( NA_GCONF_PREFS_PATH, name );
-	ret = na_gconf_utils_read_bool( na_iprefs_get_gconf_client( instance ), path, TRUE, default_value );
-	g_free( path );
+	ret = FALSE;
+
+	if( st_initialized && !st_finalized ){
+
+		path = gconf_concat_dir_and_key( IPREFS_GCONF_PREFS_PATH, name );
+		ret = na_gconf_utils_read_bool( na_iprefs_get_gconf_client( instance ), path, TRUE, default_value );
+		g_free( path );
+	}
 
 	return( ret );
 }
@@ -420,16 +416,21 @@ na_iprefs_read_bool( NAIPrefs *instance, const gchar *name, gboolean default_val
  * g_free() by the caller.
  */
 gchar *
-na_iprefs_read_string( NAIPrefs *instance, const gchar *name, const gchar *default_value )
+na_iprefs_read_string( const NAIPrefs *instance, const gchar *name, const gchar *default_value )
 {
 	gchar *path;
 	gchar *value;
 
 	g_return_val_if_fail( NA_IS_IPREFS( instance ), NULL );
 
-	path = gconf_concat_dir_and_key( NA_GCONF_PREFS_PATH, name );
-	value = na_gconf_utils_read_string( na_iprefs_get_gconf_client( instance ), path, TRUE, default_value );
-	g_free( path );
+	value = NULL;
+
+	if( st_initialized && !st_finalized ){
+
+		path = gconf_concat_dir_and_key( IPREFS_GCONF_PREFS_PATH, name );
+		value = na_gconf_utils_read_string( na_iprefs_get_gconf_client( instance ), path, TRUE, default_value );
+		g_free( path );
+	}
 
 	return( value );
 }
@@ -445,20 +446,25 @@ na_iprefs_read_string( NAIPrefs *instance, const gchar *name, const gchar *defau
  * by the caller.
  */
 GSList *
-na_iprefs_read_string_list( NAIPrefs *instance, const gchar *name, const gchar *default_value )
+na_iprefs_read_string_list( const NAIPrefs *instance, const gchar *name, const gchar *default_value )
 {
 	gchar *path;
 	GSList *list;
 
 	g_return_val_if_fail( NA_IS_IPREFS( instance ), NULL );
 
-	path = gconf_concat_dir_and_key( NA_GCONF_PREFS_PATH, name );
-	list = na_gconf_utils_read_string_list( na_iprefs_get_gconf_client( instance ), path );
-	g_free( path );
+	list = NULL;
+
+	if( st_initialized && !st_finalized ){
 
-	if(( !list || !g_slist_length( list )) && default_value ){
-		g_slist_free( list );
-		list = g_slist_append( NULL, g_strdup( default_value ));
+		path = gconf_concat_dir_and_key( IPREFS_GCONF_PREFS_PATH, name );
+		list = na_gconf_utils_read_string_list( na_iprefs_get_gconf_client( instance ), path );
+		g_free( path );
+
+		if(( !list || !g_slist_length( list )) && default_value ){
+			g_slist_free( list );
+			list = g_slist_append( NULL, g_strdup( default_value ));
+		}
 	}
 
 	return( list );
@@ -472,6 +478,7 @@ na_iprefs_read_string_list( NAIPrefs *instance, const gchar *name, const gchar *
  *
  * Writes the given boolean value.
  */
+#if 0
 void
 na_iprefs_write_bool( NAIPrefs *instance, const gchar *name, gboolean value )
 {
@@ -503,6 +510,7 @@ na_iprefs_write_string( NAIPrefs *instance, const gchar *name, const gchar *valu
 	na_gconf_utils_write_string( na_iprefs_get_gconf_client( instance ), path, value, NULL );
 	g_free( path );
 }
+#endif
 
 /**
  * na_iprefs_write_string_list
@@ -513,17 +521,21 @@ na_iprefs_write_string( NAIPrefs *instance, const gchar *name, const gchar *valu
  * Writes the value as the given GConf preference.
  */
 void
-na_iprefs_write_string_list( NAIPrefs *instance, const gchar *name, GSList *list )
+na_iprefs_write_string_list( const NAIPrefs *instance, const gchar *name, GSList *list )
 {
 	gchar *path;
 
 	g_return_if_fail( NA_IS_IPREFS( instance ));
 
-	path = gconf_concat_dir_and_key( NA_GCONF_PREFS_PATH, name );
-	na_gconf_utils_write_string_list( na_iprefs_get_gconf_client( instance ), path, list, NULL );
-	g_free( path );
+	if( st_initialized && !st_finalized ){
+
+		path = gconf_concat_dir_and_key( IPREFS_GCONF_PREFS_PATH, name );
+		na_gconf_utils_write_string_list( na_iprefs_get_gconf_client( instance ), path, list, NULL );
+		g_free( path );
+	}
 }
 
+#if 0
 /**
  * na_iprefs_migrate_key:
  * @instance: the #NAIPrefs implementor.
@@ -560,126 +572,8 @@ na_iprefs_migrate_key( NAIPrefs *instance, const gchar *old_key, const gchar *ne
 	/*remove_entry( BASE_IPREFS_GET_INTERFACE( window )->private->client, BASE_IPREFS_SCHEMAS_PATH, old_key );*/
 }
 
-/**
- * na_iprefs_get_export_format:
- * @instance: this #NAIPrefs interface instance.
- * @name: name of the export format key to be readen
- *
- * Returns: the export format currently set.
- *
- * Note: this function returns a suitable default value even if the key
- * is not found in GConf preferences or no schema has been installed.
- *
- * Note: please take care of keeping the default value synchronized with
- * those defined in schemas.
- */
-gint
-na_iprefs_get_export_format( NAIPrefs *instance, const gchar *name )
-{
-	gint export_format = DEFAULT_EXPORT_FORMAT_INT;
-	gint format_int;
-	gchar *format_str;
-
-	g_return_val_if_fail( NA_IS_IPREFS( instance ), DEFAULT_EXPORT_FORMAT_INT );
-
-	format_str = na_iprefs_read_string(
-			instance,
-			name,
-			DEFAULT_EXPORT_FORMAT_STR );
-
-	if( gconf_string_to_enum( export_format_table, format_str, &format_int )){
-		export_format = format_int;
-	}
-
-	g_free( format_str );
-
-	return( export_format );
-}
-
-/**
- * na_iprefs_get_import_mode:
- * @instance: this #NAIPrefs interface instance.
- * @name: name of the import key to be readen
- *
- * Returns: the import mode currently set.
- *
- * Note: this function returns a suitable default value even if the key
- * is not found in GConf preferences or no schema has been installed.
- *
- * Note: please take care of keeping the default value synchronized with
- * those defined in schemas.
- */
-gint
-na_iprefs_get_import_mode( NAIPrefs *instance, const gchar *name )
-{
-	gint import_mode = DEFAULT_IMPORT_MODE_INT;
-	gint import_int;
-	gchar *import_str;
-
-	g_return_val_if_fail( NA_IS_IPREFS( instance ), DEFAULT_IMPORT_MODE_INT );
-
-	import_str = na_iprefs_read_string(
-			instance,
-			name,
-			DEFAULT_IMPORT_MODE_STR );
-
-	if( gconf_string_to_enum( import_mode_table, import_str, &import_int )){
-		import_mode = import_int;
-	}
-
-	g_free( import_str );
-
-	return( import_mode );
-}
-
-/**
- * na_iprefs_set_export_format:
- * @instance: this #NAIPrefs interface instance.
- * @format: the new value to be written.
- *
- * Writes the current status of 'import/export format' to the GConf
- * preference system.
- */
-void
-na_iprefs_set_export_format( NAIPrefs *instance, const gchar *name, gint format )
-{
-	const gchar *format_str;
-
-	g_return_if_fail( NA_IS_IPREFS( instance ));
-
-	format_str = gconf_enum_to_string( export_format_table, format );
-
-	na_iprefs_write_string(
-			instance,
-			name,
-			format_str ? format_str : DEFAULT_EXPORT_FORMAT_STR );
-}
-
-/**
- * na_iprefs_set_import_mode:
- * @instance: this #NAIPrefs interface instance.
- * @mode: the new value to be written.
- *
- * Writes the current status of 'import mode' to the GConf
- * preference system.
- */
-void
-na_iprefs_set_import_mode( NAIPrefs *instance, const gchar *name, gint mode )
-{
-	const gchar *import_str;
-
-	g_return_if_fail( NA_IS_IPREFS( instance ));
-
-	import_str = gconf_enum_to_string( import_mode_table, mode );
-
-	na_iprefs_write_string(
-			instance,
-			name,
-			import_str ? import_str : DEFAULT_IMPORT_MODE_STR );
-}
-
 static void
-setup_private_data( NAIPrefs *instance )
+setup_private_data( const NAIPrefs *instance )
 {
 	NAIPrefsPrivate *ipp;
 
@@ -737,3 +631,4 @@ set_value( GConfClient *client, const gchar *path, const gchar *entry, GConfValu
 
 	g_free( fullpath );
 }
+#endif
diff --git a/src/core/na-iprefs.h b/src/core/na-iprefs.h
index 760c6f1..b74af8e 100644
--- a/src/core/na-iprefs.h
+++ b/src/core/na-iprefs.h
@@ -28,13 +28,13 @@
  *   ... and many others (see AUTHORS)
  */
 
-#ifndef __NA_RUNTIME_IPREFS_H__
-#define __NA_RUNTIME_IPREFS_H__
+#ifndef __CORE_NA_IPREFS_H__
+#define __CORE_NA_IPREFS_H__
 
 /**
  * SECTION: na_iprefs
  * @short_description: #NAIPrefs interface definition.
- * @include: runtime/na-iprefs.h
+ * @include: core/na-iprefs.h
  *
  * This interface should only be implemented by #NAPivot. This is
  * because the interface stores as an implementor structure some data
@@ -70,8 +70,6 @@
 #include <glib-object.h>
 #include <gconf/gconf-client.h>
 
-#include <api/na-gconf-keys.h>
-
 G_BEGIN_DECLS
 
 #define NA_IPREFS_TYPE						( na_iprefs_get_type())
@@ -91,22 +89,15 @@ typedef struct {
 
 /* GConf Preference keys managed by IPrefs interface
  */
-#define NA_GCONF_PREFERENCES				"preferences"
-#define NA_GCONF_PREFS_PATH					NAUTILUS_ACTIONS_GCONF_BASEDIR "/" NA_GCONF_PREFERENCES
+#define IPREFS_GCONF_BASEDIR				"/apps/nautilus-actions"
+#define IPREFS_GCONF_PREFERENCES			"preferences"
+#define IPREFS_GCONF_PREFS_PATH				IPREFS_GCONF_BASEDIR "/" IPREFS_GCONF_PREFERENCES
 
 #define IPREFS_LEVEL_ZERO_ITEMS				"iprefs-level-zero"
 #define IPREFS_DISPLAY_ALPHABETICAL_ORDER	"iprefs-alphabetical-order"
 #define IPREFS_CREATE_ROOT_MENU				"iprefs-create-root-menu"
 #define IPREFS_ADD_ABOUT_ITEM				"iprefs-add-about-item"
 
-#define IPREFS_EXPORT_FORMAT				"export-format"
-#define IPREFS_EXPORT_ASK_LAST_FORMAT		"export-ask-user-last-format"
-#define IPREFS_IMPORT_ACTIONS_IMPORT_MODE	"import-mode"
-#define IPREFS_IMPORT_ASK_LAST_MODE			"import-ask-user-last-mode"
-
-#define IPREFS_ASSIST_ESC_QUIT				"assistant-esc-quit"
-#define IPREFS_ASSIST_ESC_CONFIRM			"assistant-esc-confirm"
-
 #define IPREFS_RELABEL_MENUS				"iprefs-relabel-menus"
 #define IPREFS_RELABEL_ACTIONS				"iprefs-relabel-actions"
 #define IPREFS_RELABEL_PROFILES				"iprefs-relabel-profiles"
@@ -154,36 +145,29 @@ enum {
 
 GType        na_iprefs_get_type( void );
 
-GSList      *na_iprefs_get_level_zero_items( NAIPrefs *instance );
-void         na_iprefs_set_level_zero_items( NAIPrefs *instance, GSList *order );
+/*GSList      *na_iprefs_get_level_zero_items( NAIPrefs *instance );*/
+/*void         na_iprefs_set_level_zero_items( NAIPrefs *instance, GSList *order );*/
 
 gint         na_iprefs_get_order_mode( NAIPrefs *instance );
-void         na_iprefs_set_order_mode( NAIPrefs *instance, gint mode );
-
-gboolean     na_iprefs_should_add_about_item( NAIPrefs *instance );
-void         na_iprefs_set_add_about_item( NAIPrefs *instance, gboolean enabled );
-
-gboolean     na_iprefs_should_create_root_menu( NAIPrefs *instance );
-void         na_iprefs_set_create_root_menu( NAIPrefs *instance, gboolean enabled );
+/*void         na_iprefs_set_order_mode( NAIPrefs *instance, gint mode );*/
 
-GConfClient *na_iprefs_get_gconf_client( NAIPrefs *instance );
+/*gboolean     na_iprefs_should_add_about_item( NAIPrefs *instance );*/
+/*void         na_iprefs_set_add_about_item( NAIPrefs *instance, gboolean enabled );*/
 
-gboolean     na_iprefs_read_bool( NAIPrefs *instance, const gchar *key, gboolean default_value );
-gchar       *na_iprefs_read_string( NAIPrefs *instance, const gchar *key, const gchar *default_value );
-GSList      *na_iprefs_read_string_list( NAIPrefs *instance, const gchar *key, const gchar *default_value );
+/*gboolean     na_iprefs_should_create_root_menu( NAIPrefs *instance );*/
+/*void         na_iprefs_set_create_root_menu( NAIPrefs *instance, gboolean enabled );*/
 
-void         na_iprefs_write_bool( NAIPrefs *instance, const gchar *key, gboolean value );
-void         na_iprefs_write_string( NAIPrefs *instance, const gchar *key, const gchar *value );
-void         na_iprefs_write_string_list( NAIPrefs *instance, const gchar *key, GSList *value );
+GConfClient *na_iprefs_get_gconf_client ( const NAIPrefs *instance );
 
-void         na_iprefs_migrate_key( NAIPrefs *instance, const gchar *old_key, const gchar *new_key );
+gboolean     na_iprefs_read_bool        ( const NAIPrefs *instance, const gchar *key, gboolean default_value );
+gchar       *na_iprefs_read_string      ( const NAIPrefs *instance, const gchar *key, const gchar *default_value );
+GSList      *na_iprefs_read_string_list ( const NAIPrefs *instance, const gchar *key, const gchar *default_value );
 
-gint         na_iprefs_get_export_format( NAIPrefs *instance, const gchar *pref );
-gint         na_iprefs_get_import_mode( NAIPrefs *instance, const gchar *pref );
+/*void         na_iprefs_write_bool( NAIPrefs *instance, const gchar *key, gboolean value );*/
+void         na_iprefs_write_string_list( const NAIPrefs *instance, const gchar *key, GSList *value );
 
-void         na_iprefs_set_export_format( NAIPrefs *instance, const gchar *pref, gint format );
-void         na_iprefs_set_import_mode( NAIPrefs *instance, const gchar *pref, gint mode );
+/*void         na_iprefs_migrate_key( NAIPrefs *instance, const gchar *old_key, const gchar *new_key );*/
 
 G_END_DECLS
 
-#endif /* __NA_RUNTIME_IPREFS_H__ */
+#endif /* __CORE_NA_IPREFS_H__ */



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