[nautilus-actions] Do not compile deprecated functions



commit 0e52b8e14ec58ca7a76acff4217fe411b9234b3e
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Feb 16 23:01:12 2011 +0100

    Do not compile deprecated functions

 ChangeLog                          |    6 ++++++
 src/api/na-data-boxed.h            |    2 +-
 src/api/na-gconf-utils.h           |    3 +--
 src/core/na-data-boxed.c           |    5 +++++
 src/core/na-iduplicable.c          |    2 ++
 src/io-gconf/nagp-gconf-provider.c |   23 +++++++++++++++++++++++
 6 files changed, 38 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ec3c71d..978a787 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-02-16 Pierre Wieser <pwieser trychlos org>
 
+	* src/api/na-data-boxed.h:
+	* src/api/na-gconf-utils.h:
+	* src/core/na-data-boxed.c:
+	* src/core/na-iduplicable.c:
+	* src/io-gconf/nagp-gconf-provider.c: Do not compile deprecated functions.
+
 	* configure.ac:
 	* m4/na-maintainer-mode.m4: Add --enable-deprecated configure option.
 
diff --git a/src/api/na-data-boxed.h b/src/api/na-data-boxed.h
index dc116b4..bd9bd55 100644
--- a/src/api/na-data-boxed.h
+++ b/src/api/na-data-boxed.h
@@ -100,8 +100,8 @@ gboolean         na_data_boxed_is_valid       ( const NADataBoxed *boxed );
 gboolean         na_data_boxed_are_equal      ( const NADataBoxed *a, const NADataBoxed *b );
 void             na_data_boxed_dump           ( const NADataBoxed *boxed );
 gchar           *na_data_boxed_get_as_string  ( const NADataBoxed *boxed );
-void            *na_data_boxed_get_as_void    ( const NADataBoxed *boxed );
 void             na_data_boxed_get_as_value   ( const NADataBoxed *boxed, GValue *value );
+void            *na_data_boxed_get_as_void    ( const NADataBoxed *boxed );
 void             na_data_boxed_set_from_boxed ( NADataBoxed *boxed, const NADataBoxed *value );
 void             na_data_boxed_set_from_string( NADataBoxed *boxed, const gchar *value );
 void             na_data_boxed_set_from_value ( NADataBoxed *boxed, const GValue *value );
diff --git a/src/api/na-gconf-utils.h b/src/api/na-gconf-utils.h
index 7640908..457f309 100644
--- a/src/api/na-gconf-utils.h
+++ b/src/api/na-gconf-utils.h
@@ -70,10 +70,9 @@ gboolean na_gconf_utils_write_int        ( GConfClient *gconf, const gchar *path
 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 );
+#endif /* NA_DISABLE_DEPRECATED */
 
 G_END_DECLS
 
diff --git a/src/core/na-data-boxed.c b/src/core/na-data-boxed.c
index 517215d..ac10577 100644
--- a/src/core/na-data-boxed.c
+++ b/src/core/na-data-boxed.c
@@ -378,6 +378,7 @@ na_data_boxed_get_param_spec( const NADataDef *def )
 	return( spec );
 }
 
+#ifndef NA_DISABLE_DEPRECATED
 /**
  * na_data_boxed_are_equal:
  * @a: the first #NADataBoxed object.
@@ -397,6 +398,7 @@ na_data_boxed_are_equal( const NADataBoxed *a, const NADataBoxed *b )
 
 	return( na_boxed_are_equal( NA_BOXED( a ), NA_BOXED( b )));
 }
+#endif /* NA_DISABLE_DEPRECATED */
 
 /**
  * na_data_boxed_is_default:
@@ -452,6 +454,8 @@ na_data_boxed_is_valid( const NADataBoxed *boxed )
 
 	return( is_valid );
 }
+
+#ifndef NA_DISABLE_DEPRECATED
 /**
  * na_data_boxed_dump:
  * @boxed: this #NADataBoxed object.
@@ -589,6 +593,7 @@ na_data_boxed_set_from_void( NADataBoxed *boxed, const void *value )
 {
 	na_boxed_set_from_void( NA_BOXED( boxed ), value );
 }
+#endif /* NA_DISABLE_DEPRECATED */
 
 static GParamSpec *
 bool_spec( const NADataDef *def )
diff --git a/src/core/na-iduplicable.c b/src/core/na-iduplicable.c
index c53a941..5abef10 100644
--- a/src/core/na-iduplicable.c
+++ b/src/core/na-iduplicable.c
@@ -512,6 +512,7 @@ na_iduplicable_set_origin( NAIDuplicable *object, const NAIDuplicable *origin )
 	}
 }
 
+#ifndef NA_DISABLE_DEPRECATED
 /**
  * na_iduplicable_set_modified:
  * @object: the #NAIDuplicable object whose modification status is to be set.
@@ -536,6 +537,7 @@ na_iduplicable_set_modified( NAIDuplicable *object, gboolean modified )
 		str->modified = modified;
 	}
 }
+#endif /* NA_DISABLE_DEPRECATED */
 
 static void
 v_copy( NAIDuplicable *target, const NAIDuplicable *source )
diff --git a/src/io-gconf/nagp-gconf-provider.c b/src/io-gconf/nagp-gconf-provider.c
index d260dd5..c15f8ca 100644
--- a/src/io-gconf/nagp-gconf-provider.c
+++ b/src/io-gconf/nagp-gconf-provider.c
@@ -52,7 +52,10 @@ struct _NagpGConfProviderClassPrivate {
 
 static GType         st_module_type = 0;
 static GObjectClass *st_parent_class = NULL;
+
+#ifndef NA_DISABLE_DEPRECATED
 static gint          st_burst_timeout = 100;		/* burst timeout in msec */
+#endif
 
 static void     class_init( NagpGConfProviderClass *klass );
 static void     instance_init( GTypeInstance *instance, gpointer klass );
@@ -67,10 +70,12 @@ static guint    iio_provider_get_version( const NAIIOProvider *provider );
 static void     ifactory_provider_iface_init( NAIFactoryProviderInterface *iface );
 static guint    ifactory_provider_get_version( const NAIFactoryProvider *provider );
 
+#ifndef NA_DISABLE_DEPRECATED
 static GList   *install_monitors( NagpGConfProvider *provider );
 static void     config_path_changed_cb( GConfClient *client, guint cnxn_id, GConfEntry *entry, NagpGConfProvider *provider );
 static gboolean config_path_changed_trigger_interface( NagpGConfProvider *provider );
 static gulong   time_val_diff( const GTimeVal *recent, const GTimeVal *old );
+#endif
 
 GType
 nagp_gconf_provider_get_type( void )
@@ -151,7 +156,10 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	self->private->dispose_has_run = FALSE;
 
 	self->private->gconf = gconf_client_get_default();
+
+#ifndef NA_DISABLE_DEPRECATED
 	self->private->monitors = install_monitors( self );
+#endif
 }
 
 static void
@@ -170,8 +178,10 @@ instance_dispose( GObject *object )
 
 		self->private->dispose_has_run = TRUE;
 
+#ifndef NA_DISABLE_DEPRECATED
 		/* release the GConf monitoring */
 		na_gconf_monitor_release_monitors( self->private->monitors );
+#endif
 
 		/* release the GConf connexion */
 		g_object_unref( self->private->gconf );
@@ -216,8 +226,13 @@ iio_provider_iface_init( NAIIOProviderInterface *iface )
 	iface->read_items = nagp_iio_provider_read_items;
 	iface->is_willing_to_write = nagp_iio_provider_is_willing_to_write;
 	iface->is_able_to_write = nagp_iio_provider_is_able_to_write;
+#ifndef NA_DISABLE_DEPRECATED
 	iface->write_item = nagp_iio_provider_write_item;
 	iface->delete_item = nagp_iio_provider_delete_item;
+#else
+	iface->write_item = NULL;
+	iface->delete_item = NULL;
+#endif
 	iface->duplicate_data = NULL;
 }
 
@@ -250,9 +265,15 @@ ifactory_provider_iface_init( NAIFactoryProviderInterface *iface )
 	iface->read_start = nagp_reader_read_start;
 	iface->read_data = nagp_reader_read_data;
 	iface->read_done = nagp_reader_read_done;
+#ifndef NA_DISABLE_DEPRECATED
 	iface->write_start = nagp_writer_write_start;
 	iface->write_data = nagp_writer_write_data;
 	iface->write_done = nagp_writer_write_done;
+#else
+	iface->write_start = NULL;
+	iface->write_data = NULL;
+	iface->write_done = NULL;
+#endif
 }
 
 static guint
@@ -261,6 +282,7 @@ ifactory_provider_get_version( const NAIFactoryProvider *provider )
 	return( 1 );
 }
 
+#ifndef NA_DISABLE_DEPRECATED
 static GList *
 install_monitors( NagpGConfProvider *provider )
 {
@@ -390,3 +412,4 @@ time_val_diff( const GTimeVal *recent, const GTimeVal *old )
 	microsec += recent->tv_usec  - old->tv_usec;
 	return( microsec );
 }
+#endif /* NA_DISABLE_DEPRECATED */



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