[nautilus-actions] Remove deprecated nact_iprefs_migrate_key() function



commit 659e145009a26340b32532c8b0978d27967990a0
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Jan 14 01:42:54 2011 +0100

    Remove deprecated nact_iprefs_migrate_key() function

 ChangeLog                    |    6 +++
 src/nact/nact-icommand-tab.c |    4 --
 src/nact/nact-iprefs.c       |   95 ------------------------------------------
 src/nact/nact-iprefs.h       |    4 --
 src/nact/nact-main-menubar.c |    4 --
 5 files changed, 6 insertions(+), 107 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 47b36a6..4fd61f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,12 @@
 	* src/utils/nautilus-actions-run.c:
 	* src/utils/nautilus-actions-schemas.c: Add locale.h include.
 
+	* src/nact/nact-iprefs.c:
+	* src/nact/nact-iprefs.h (nact_iprefs_migrate_key): Remove deprecated function.
+
+	* src/nact/nact-icommand-tab.c (nact_icommand_tab_initial_load_toplevel):
+	Updated accordingly.
+
 	Global renaming of preferences.
 
 	* README-GCONF:
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 26a38b8..770c7db 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -184,10 +184,6 @@ nact_icommand_tab_initial_load_toplevel( NactICommandTab *instance )
 	if( st_initialized && !st_finalized ){
 
 		g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
-
-		nact_iprefs_migrate_key( BASE_WINDOW( instance ), "iconditions-legend-dialog", NA_IPREFS_COMMAND_LEGEND_WSP );
-		nact_iprefs_migrate_key( BASE_WINDOW( instance ), "iconditions-command-chooser", NA_IPREFS_COMMAND_CHOOSER_WSP );
-		nact_iprefs_migrate_key( BASE_WINDOW( instance ), "iconditions-folder-uri", NA_IPREFS_COMMAND_CHOOSER_URI );
 	}
 }
 
diff --git a/src/nact/nact-iprefs.c b/src/nact/nact-iprefs.c
index 6e6a258..641da54 100644
--- a/src/nact/nact-iprefs.c
+++ b/src/nact/nact-iprefs.c
@@ -51,11 +51,6 @@ static GType       register_type( void );
 static void        interface_base_init( NactIPrefsInterface *klass );
 static void        interface_base_finalize( NactIPrefsInterface *klass );
 
-#if 0
-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
 nact_iprefs_get_type( void )
 {
@@ -193,47 +188,6 @@ nact_iprefs_set_export_format( const BaseWindow *window, const gchar *name, GQua
 }
 
 /**
- * nact_iprefs_migrate_key:
- * @window: a #BaseWindow window.
- * @old_key: the old preference entry.
- * @new_key: the new preference entry.
- *
- * Migrates the content of an entry from an obsoleted key to a new one.
- * Removes the old key, along with the schema associated to it,
- * considering that the version which asks for this migration has
- * installed a schema corresponding to the new key.
- */
-void
-nact_iprefs_migrate_key( const BaseWindow *window, const gchar *old_key, const gchar *new_key )
-{
-#if 0
-	static const gchar *thisfn = "nact_iprefs_migrate_key";
-	GConfClient *gconf_client;
-	GConfValue *value;
-
-	g_debug( "%s: window=%p, old_key=%s, new_key=%s", thisfn, ( void * ) window, old_key, new_key );
-	g_return_if_fail( BASE_IS_WINDOW( window ));
-
-	if( st_initialized && !st_finalized ){
-
-		gconf_client = NACT_IPREFS_GET_INTERFACE( window )->private->client;
-
-		value = get_value( gconf_client, IPREFS_GCONF_PREFS_PATH, new_key );
-		if( !value ){
-			value = get_value( gconf_client, IPREFS_GCONF_PREFS_PATH, old_key );
-			if( value ){
-				set_value( gconf_client, IPREFS_GCONF_PREFS_PATH, new_key, value );
-				gconf_value_free( value );
-			}
-		}
-
-		/* do not remove entries which may still be used by an older N-A version
-		 */
-	}
-#endif
-}
-
-/**
  * nact_iprefs_write_bool:
  * @window: this #BaseWindow-derived window.
  * @name: the preference entry.
@@ -313,52 +267,3 @@ nact_iprefs_write_string( const BaseWindow *window, const gchar *name, const gch
 		na_settings_set_string( settings, name, value );
 	}
 }
-
-#if 0
-static GConfValue *
-get_value( GConfClient *client, const gchar *path, const gchar *entry )
-{
-	static const gchar *thisfn = "na_iprefs_get_value";
-	GError *error = NULL;
-	gchar *fullpath;
-	GConfValue *value;
-
-	fullpath = gconf_concat_dir_and_key( path, entry );
-
-	value = gconf_client_get_without_default( client, fullpath, &error );
-
-	if( error ){
-		g_warning( "%s: key=%s, %s", thisfn, fullpath, error->message );
-		g_error_free( error );
-		if( value ){
-			gconf_value_free( value );
-			value = NULL;
-		}
-	}
-
-	g_free( fullpath );
-
-	return( value );
-}
-
-static void
-set_value( GConfClient *client, const gchar *path, const gchar *entry, GConfValue *value )
-{
-	static const gchar *thisfn = "na_iprefs_set_value";
-	GError *error = NULL;
-	gchar *fullpath;
-
-	g_return_if_fail( value );
-
-	fullpath = gconf_concat_dir_and_key( path, entry );
-
-	gconf_client_set( client, fullpath, value, &error );
-
-	if( error ){
-		g_warning( "%s: key=%s, %s", thisfn, fullpath, error->message );
-		g_error_free( error );
-	}
-
-	g_free( fullpath );
-}
-#endif
diff --git a/src/nact/nact-iprefs.h b/src/nact/nact-iprefs.h
index a063cea..4c1c52a 100644
--- a/src/nact/nact-iprefs.h
+++ b/src/nact/nact-iprefs.h
@@ -63,10 +63,6 @@ GType nact_iprefs_get_type( void );
 GQuark nact_iprefs_get_export_format( const BaseWindow *window, const gchar *pref );
 void   nact_iprefs_set_export_format( const BaseWindow *window, const gchar *pref, GQuark format );
 
-/* Obsoleted since 3.1.0 and the migration to configuration files
- */
-void  nact_iprefs_migrate_key       ( const BaseWindow *window, const gchar *old_key, const gchar *new_key );
-
 void  nact_iprefs_write_bool        ( const BaseWindow *window, const gchar *key, gboolean value );
 void  nact_iprefs_write_uint        ( const BaseWindow *window, const gchar *key, guint value );
 void  nact_iprefs_write_string      ( const BaseWindow *window, const gchar *name, const gchar *value );
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index 26fd752..c7100fc 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -60,10 +60,6 @@
 #define MENUBAR_PROP_STATUS_CONTEXT			"nact-menubar-status-context"
 #define MENUBAR_PROP_MAIN_STATUS_CONTEXT	"nact-menubar-main-status-context"
 #define MENUBAR_PROP_ACTIONS_GROUP			"nact-menubar-actions-group"
-#define MENUBAR_IPREFS_FILE_TOOLBAR			"main-file-toolbar"
-#define MENUBAR_IPREFS_EDIT_TOOLBAR			"main-edit-toolbar"
-#define MENUBAR_IPREFS_TOOLS_TOOLBAR		"main-tools-toolbar"
-#define MENUBAR_IPREFS_HELP_TOOLBAR			"main-help-toolbar"
 
 enum {
 	MENUBAR_FILE_TOOLBAR_POS = 0,



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