[nautilus-actions] Remove nact_iprefs_write_bool/uint/string() deprecated functions
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove nact_iprefs_write_bool/uint/string() deprecated functions
- Date: Wed, 19 Jan 2011 21:53:21 +0000 (UTC)
commit baa39edfd4c8c57b77c527ce03c30a6cdcbe9954
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jan 14 02:03:22 2011 +0100
Remove nact_iprefs_write_bool/uint/string() deprecated functions
ChangeLog | 7 ++++
src/nact/nact-iprefs.c | 81 ------------------------------------------
src/nact/nact-iprefs.h | 4 --
src/nact/nact-main-toolbar.c | 9 ++++-
4 files changed, 15 insertions(+), 86 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6b1167a..4047cc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,13 @@
* 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_write_bool, nact_iprefs_write_uint,
+ nact_iprefs_write_string): Remove deprecated functions.
+
+ * src/nact/nact-main-toolbar.c (nact_main_toolbar_activate):
+ Updated accordingly.
+
* src/nact/base-iprefs.c:
* src/nact/base-iprefs.h (base_iprefs_get_int, base_iprefs_set_int):
Remove deprecated functions.
diff --git a/src/nact/nact-iprefs.c b/src/nact/nact-iprefs.c
index 641da54..f7c88e8 100644
--- a/src/nact/nact-iprefs.c
+++ b/src/nact/nact-iprefs.c
@@ -186,84 +186,3 @@ nact_iprefs_set_export_format( const BaseWindow *window, const gchar *name, GQua
na_settings_set_string( settings, name, g_quark_to_string( format ));
}
}
-
-/**
- * nact_iprefs_write_bool:
- * @window: this #BaseWindow-derived window.
- * @name: the preference entry.
- * @value: the value to be written.
- *
- * Writes the given boolean value.
- */
-void
-nact_iprefs_write_bool( const BaseWindow *window, const gchar *name, gboolean value )
-{
- NactApplication *application;
- NAUpdater *updater;
- NASettings *settings;
-
- g_return_if_fail( BASE_IS_WINDOW( window ));
- g_return_if_fail( NACT_IS_IPREFS( window ));
-
- if( st_initialized && !st_finalized ){
-
- application = NACT_APPLICATION( base_window_get_application( window ));
- updater = nact_application_get_updater( application );
- settings = na_pivot_get_settings( NA_PIVOT( updater ));
- na_settings_set_boolean( settings, name, value );
- }
-}
-
-/**
- * nact_iprefs_write_uint:
- * @window: this #BaseWindow-derived window.
- * @name: the preference entry.
- * @value: the value to be written.
- *
- * Writes the given uint value.
- */
-void
-nact_iprefs_write_uint( const BaseWindow *window, const gchar *name, guint value )
-{
- NactApplication *application;
- NAUpdater *updater;
- NASettings *settings;
-
- g_return_if_fail( BASE_IS_WINDOW( window ));
- g_return_if_fail( NACT_IS_IPREFS( window ));
-
- if( st_initialized && !st_finalized ){
-
- application = NACT_APPLICATION( base_window_get_application( window ));
- updater = nact_application_get_updater( application );
- settings = na_pivot_get_settings( NA_PIVOT( updater ));
- na_settings_set_uint( settings, name, value );
- }
-}
-
-/**
- * nact_iprefs_write_string:
- * @window: this #BaseWindow-derived window.
- * @name: the preference key.
- * @value: the value to be written.
- *
- * Writes the value as the given GConf preference.
- */
-void
-nact_iprefs_write_string( const BaseWindow *window, const gchar *name, const gchar *value )
-{
- NactApplication *application;
- NAUpdater *updater;
- NASettings *settings;
-
- g_return_if_fail( BASE_IS_WINDOW( window ));
- g_return_if_fail( NACT_IS_IPREFS( window ));
-
- if( st_initialized && !st_finalized ){
-
- application = NACT_APPLICATION( base_window_get_application( window ));
- updater = nact_application_get_updater( application );
- settings = na_pivot_get_settings( NA_PIVOT( updater ));
- na_settings_set_string( settings, name, value );
- }
-}
diff --git a/src/nact/nact-iprefs.h b/src/nact/nact-iprefs.h
index 4c1c52a..c0a9438 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 );
-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 );
-
G_END_DECLS
#endif /* __NACT_IPREFS_H__ */
diff --git a/src/nact/nact-main-toolbar.c b/src/nact/nact-main-toolbar.c
index d344022..d6c8264 100644
--- a/src/nact/nact-main-toolbar.c
+++ b/src/nact/nact-main-toolbar.c
@@ -132,6 +132,9 @@ nact_main_toolbar_activate( NactMainWindow *window, int toolbar_id, GtkUIManager
ToolbarProps *props;
GtkWidget *toolbar, *hbox, *handle;
gulong attach_id, detach_id;
+ NactApplication *application;
+ NAUpdater *updater;
+ NASettings *settings;
props = get_toolbar_properties( toolbar_id );
if( !props ){
@@ -168,7 +171,11 @@ nact_main_toolbar_activate( NactMainWindow *window, int toolbar_id, GtkUIManager
g_debug( "%s: ref=%d", thisfn, G_OBJECT( toolbar )->ref_count );
}
- nact_iprefs_write_bool( BASE_WINDOW( window ), props->prefs_key, is_active );
+ application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
+ updater = nact_application_get_updater( application );
+ settings = na_pivot_get_settings( NA_PIVOT( updater ));
+
+ na_settings_set_boolean( settings, props->prefs_key, is_active );
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]