[nautilus-actions] Only GConf writing operations are marked deprecated
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Only GConf writing operations are marked deprecated
- Date: Mon, 14 Feb 2011 23:53:22 +0000 (UTC)
commit 869718abdef744391e2a689f80245ed0aed98a4a
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Feb 14 23:52:46 2011 +0100
Only GConf writing operations are marked deprecated
ChangeLog | 9 +++++++++
src/api/na-gconf-monitor.h | 1 -
src/api/na-gconf-utils.h | 8 ++++----
src/core/na-gconf-monitor.c | 4 ++++
src/core/na-gconf-utils.c | 33 +++++++--------------------------
src/io-gconf/nagp-writer.c | 12 ++++++++++++
src/io-gconf/nagp-writer.h | 4 ++++
7 files changed, 40 insertions(+), 31 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 534095d..ae8a4bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-02-14 Pierre Wieser <pwieser trychlos org>
+ Only GConf writing operations are marked deprecated
+
+ * src/api/na-gconf-monitor.h:
+ * src/api/na-gconf-utils.h:
+ * src/core/na-gconf-monitor.c:
+ * src/core/na-gconf-utils.c:
+ * src/io-gconf/nagp-writer.c:
+ * src/io-gconf/nagp-writer.h: Updated accordingly.
+
No more use deprecated functions
* src/core/na-factory-object.c:
diff --git a/src/api/na-gconf-monitor.h b/src/api/na-gconf-monitor.h
index 79ad0bc..3f6b2c0 100644
--- a/src/api/na-gconf-monitor.h
+++ b/src/api/na-gconf-monitor.h
@@ -32,7 +32,6 @@
#define __NAUTILUS_ACTIONS_API_NA_GCONF_MONITOR_H__
#ifndef NA_DISABLE_DEPRECATED
-
/**
* SECTION: gconf-monitor
* @title: NAGConfMonitor
diff --git a/src/api/na-gconf-utils.h b/src/api/na-gconf-utils.h
index 68bbb6c..c54297f 100644
--- a/src/api/na-gconf-utils.h
+++ b/src/api/na-gconf-utils.h
@@ -31,8 +31,6 @@
#ifndef __NAUTILUS_ACTIONS_API_NA_GCONF_UTILS_H__
#define __NAUTILUS_ACTIONS_API_NA_GCONF_UTILS_H__
-#ifndef NA_DISABLE_DEPRECATED
-
/**
* SECTION: gconf-utils
* @title: GConf Misc
@@ -63,17 +61,19 @@ gint na_gconf_utils_read_int ( GConfClient *gconf, const gchar *path
gchar *na_gconf_utils_read_string ( GConfClient *gconf, const gchar *path, gboolean use_schema, const gchar *default_value );
GSList *na_gconf_utils_read_string_list ( GConfClient *gconf, const gchar *path );
+/* Writing in GConf is deprecated since 3.1.0
+ */
+#ifndef NA_DISABLE_DEPRECATED
gboolean na_gconf_utils_write_bool ( GConfClient *gconf, const gchar *path, gboolean value, gchar **message );
gboolean na_gconf_utils_write_int ( GConfClient *gconf, const gchar *path, gint value, gchar **message );
gboolean na_gconf_utils_write_string ( GConfClient *gconf, const gchar *path, const gchar *value, gchar **message );
gboolean na_gconf_utils_write_string_list( GConfClient *gconf, const gchar *path, GSList *value, gchar **message );
-
gboolean na_gconf_utils_remove_entry ( GConfClient *gconf, const gchar *path, gchar **message );
+#endif /* NA_DISABLE_DEPRECATED */
GSList *na_gconf_utils_slist_from_string( const gchar *value );
gchar *na_gconf_utils_slist_to_string ( GSList *slist );
G_END_DECLS
-#endif /* NA_DISABLE_DEPRECATED */
#endif /* __NAUTILUS_ACTIONS_API_NA_GCONF_UTILS_H__ */
diff --git a/src/core/na-gconf-monitor.c b/src/core/na-gconf-monitor.c
index b15b55d..38c1eb9 100644
--- a/src/core/na-gconf-monitor.c
+++ b/src/core/na-gconf-monitor.c
@@ -34,6 +34,8 @@
#include <api/na-gconf-monitor.h>
+#ifndef NA_DISABLE_DEPRECATED
+
/* private class data
*/
struct _NAGConfMonitorClassPrivate {
@@ -306,3 +308,5 @@ release_monitor( NAGConfMonitor *monitor )
}
}
}
+
+#endif /* NA_DISABLE_DEPRECATED */
diff --git a/src/core/na-gconf-utils.c b/src/core/na-gconf-utils.c
index 4bc3450..23ff024 100644
--- a/src/core/na-gconf-utils.c
+++ b/src/core/na-gconf-utils.c
@@ -39,7 +39,10 @@
static void dump_entry( GConfEntry *entry, void *user_data );
static GConfValue *read_value( GConfClient *gconf, const gchar *path, gboolean use_schema, GConfValueType type );
+
+#ifndef NA_DISABLE_DEPRECATED
static gboolean sync_gconf( GConfClient *gconf, gchar **message );
+#endif /* NA_DISABLE_DEPRECATED */
/**
* na_gconf_utils_get_subdirs:
@@ -51,8 +54,6 @@ static gboolean sync_gconf( GConfClient *gconf, gchar **message );
* The returned list should be na_gconf_utils_free_subdirs() by the caller.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
GSList *
na_gconf_utils_get_subdirs( GConfClient *gconf, const gchar *path )
@@ -79,8 +80,6 @@ na_gconf_utils_get_subdirs( GConfClient *gconf, const gchar *path )
* Release the list.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
void
na_gconf_utils_free_subdirs( GSList *subdirs )
@@ -97,8 +96,6 @@ na_gconf_utils_free_subdirs( GSList *subdirs )
* %FALSE else.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gboolean
na_gconf_utils_has_entry( GSList *entries, const gchar *entry )
@@ -131,8 +128,6 @@ na_gconf_utils_has_entry( GSList *entries, const gchar *entry )
* na_gconf_utils_free_entries().
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
GSList *
na_gconf_utils_get_entries( GConfClient *gconf, const gchar *path )
@@ -164,8 +159,6 @@ na_gconf_utils_get_entries( GConfClient *gconf, const gchar *path )
* to %FALSE.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gboolean
na_gconf_utils_get_bool_from_entries( GSList *entries, const gchar *entry, gboolean *value )
@@ -215,8 +208,6 @@ na_gconf_utils_get_bool_from_entries( GSList *entries, const gchar *entry, gbool
* If @value is returned not NULL, it should be g_free() by the caller.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gboolean
na_gconf_utils_get_string_from_entries( GSList *entries, const gchar *entry, gchar **value )
@@ -267,8 +258,6 @@ na_gconf_utils_get_string_from_entries( GSList *entries, const gchar *entry, gch
* by the caller.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gboolean
na_gconf_utils_get_string_list_from_entries( GSList *entries, const gchar *entry, GSList **value )
@@ -315,8 +304,6 @@ na_gconf_utils_get_string_list_from_entries( GSList *entries, const gchar *entry
* Dumps the content of the entries.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
void
na_gconf_utils_dump_entries( GSList *entries )
@@ -377,8 +364,6 @@ dump_entry( GConfEntry *entry, void *user_data )
* Releases the provided list.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
void
na_gconf_utils_free_entries( GSList *entries )
@@ -398,8 +383,6 @@ na_gconf_utils_free_entries( GSList *entries )
* Returns: the required boolean value.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gboolean
na_gconf_utils_read_bool( GConfClient *gconf, const gchar *path, gboolean use_schema, gboolean default_value )
@@ -431,8 +414,6 @@ na_gconf_utils_read_bool( GConfClient *gconf, const gchar *path, gboolean use_sc
* Returns: the required integer value.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gint
na_gconf_utils_read_int( GConfClient *gconf, const gchar *path, gboolean use_schema, gint default_value )
@@ -466,8 +447,6 @@ na_gconf_utils_read_int( GConfClient *gconf, const gchar *path, gboolean use_sch
* should be g_free() by the caller.
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
gchar *
na_gconf_utils_read_string( GConfClient *gconf, const gchar *path, gboolean use_schema, const gchar *default_value )
@@ -501,8 +480,6 @@ na_gconf_utils_read_string( GConfClient *gconf, const gchar *path, gboolean use_
* The returned list must be released with na_core_utils_slist_free().
*
* Since: 2.30
- *
- * Deprecated: 3.1.0
*/
GSList *
na_gconf_utils_read_string_list( GConfClient *gconf, const gchar *path )
@@ -524,6 +501,7 @@ na_gconf_utils_read_string_list( GConfClient *gconf, const gchar *path )
return( list_strings );
}
+#ifndef NA_DISABLE_DEPRECATED
/**
* na_gconf_utils_write_bool:
* @gconf: a GConfClient instance.
@@ -723,6 +701,7 @@ na_gconf_utils_remove_entry( GConfClient *gconf, const gchar *path, gchar **mess
return( ret );
}
+#endif /* NA_DISABLE_DEPRECATED */
/**
* na_gconf_utils_slist_from_string:
@@ -830,6 +809,7 @@ read_value( GConfClient *gconf, const gchar *path, gboolean use_schema, GConfVal
return( value );
}
+#ifndef NA_DISABLE_DEPRECATED
static gboolean
sync_gconf( GConfClient *gconf, gchar **message )
{
@@ -849,3 +829,4 @@ sync_gconf( GConfClient *gconf, gchar **message )
return( ret );
}
+#endif /* NA_DISABLE_DEPRECATED */
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 5dca9a1..69cafaf 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -46,8 +46,10 @@
#include "nagp-writer.h"
#include "nagp-keys.h"
+#ifndef NA_DISABLE_DEPRECATED
static void write_start_write_type( NagpGConfProvider *provider, NAObjectItem *item );
static void write_start_write_version( NagpGConfProvider *provider, NAObjectItem *item );
+#endif
/*
* API function: should only be called through NAIIOProvider interface
@@ -55,7 +57,11 @@ static void write_start_write_version( NagpGConfProvider *provider, NAObjectItem
gboolean
nagp_iio_provider_is_willing_to_write( const NAIIOProvider *provider )
{
+#ifndef NA_DISABLE_DEPRECATED
return( TRUE );
+#else
+ return( FALSE );
+#endif
}
/*
@@ -72,6 +78,7 @@ nagp_iio_provider_is_willing_to_write( const NAIIOProvider *provider )
gboolean
nagp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
{
+#ifndef NA_DISABLE_DEPRECATED
static const gchar *thisfn = "nagp_iio_provider_is_able_to_write";
static const gchar *path = "/apps/nautilus-actions/foo";
NagpGConfProvider *self;
@@ -108,8 +115,12 @@ nagp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
g_debug( "%s: provider=%p, able_to=%s", thisfn, ( void * ) provider, able_to ? "True":"False" );
return( able_to );
+#else
+ return( FALSE );
+#endif
}
+#ifndef NA_DISABLE_DEPRECATED
/*
* update an existing item or write a new one
* in all cases, it is much more easy to delete the existing entries
@@ -383,3 +394,4 @@ nagp_writer_write_done( const NAIFactoryProvider *writer, void *writer_data,
{
return( NA_IIO_PROVIDER_CODE_OK );
}
+#endif /* NA_DISABLE_DEPRECATED */
diff --git a/src/io-gconf/nagp-writer.h b/src/io-gconf/nagp-writer.h
index e1b6872..ffa7eb4 100644
--- a/src/io-gconf/nagp-writer.h
+++ b/src/io-gconf/nagp-writer.h
@@ -43,6 +43,9 @@ gboolean nagp_iio_provider_is_willing_to_write( const NAIIOProvider *provider );
gboolean nagp_iio_provider_is_able_to_write ( const NAIIOProvider *provider );
+/* Writing into GConf is deprecated since 3.1.0
+ */
+#ifndef NA_DISABLE_DEPRECATED
guint nagp_iio_provider_write_item ( const NAIIOProvider *provider,
const NAObjectItem *item, GSList **message );
@@ -62,6 +65,7 @@ guint nagp_writer_write_data ( const NAIFactoryProvider *provider, void *writ
guint nagp_writer_write_done ( const NAIFactoryProvider *writer, void *writer_data,
const NAIFactoryObject *object,
GSList **messages );
+#endif /* NA_DISABLE_DEPRECATED */
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]