[nautilus-actions] na_core_utils_str_add_prefix(): deprecated function
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] na_core_utils_str_add_prefix(): deprecated function
- Date: Sun, 1 Jan 2012 18:19:20 +0000 (UTC)
commit 223a01af9f99c32bbd8015ba0966f0eb50d11d75
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 1 18:46:06 2012 +0100
na_core_utils_str_add_prefix(): deprecated function
ChangeLog | 3 ++
src/api/na-core-utils.h | 2 +
src/core/na-core-utils.c | 55 +++++++++++++++++++++++++---------------------
3 files changed, 35 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c2881e6..aa14b68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-01-01 Pierre Wieser <pwieser trychlos org>
+ * src/api/na-core-utils.h:
+ * src/core/na-core-utils.c (na_core_utils_str_add_prefix): Deprecated function.
+
* src/core/na-import-mode.c:
* src/core/na-import-mode.h (na_import_mode_get_id): New function.
diff --git a/src/api/na-core-utils.h b/src/api/na-core-utils.h
index af6af73..5155b04 100644
--- a/src/api/na-core-utils.h
+++ b/src/api/na-core-utils.h
@@ -48,7 +48,9 @@ gboolean na_core_utils_boolean_from_string( const gchar *string );
/* string manipulation
*/
+#ifdef NA_ENABLE_DEPRECATED
gchar *na_core_utils_str_add_prefix( const gchar *prefix, const gchar *str );
+#endif
int na_core_utils_str_collate( const gchar *str1, const gchar *str2 );
gchar *na_core_utils_str_remove_char( const gchar *string, const gchar *to_remove );
gchar *na_core_utils_str_remove_suffix( const gchar *string, const gchar *suffix );
diff --git a/src/core/na-core-utils.c b/src/core/na-core-utils.c
index 09409b1..b40582a 100644
--- a/src/core/na-core-utils.c
+++ b/src/core/na-core-utils.c
@@ -49,7 +49,9 @@
#define SIZE_MIN 1
#define SIZE_MAX 1048576 /* 1 MB */
+#ifdef NA_ENABLE_DEPRECATED
static GSList *text_to_string_list( const gchar *text, const gchar *separator, const gchar *default_value );
+#endif
static gboolean info_dir_is_writable( GFile *file, const gchar *path );
static gboolean file_is_loadable( GFile *file );
@@ -70,6 +72,7 @@ na_core_utils_boolean_from_string( const gchar *string )
return( g_ascii_strcasecmp( string, "true" ) == 0 || atoi( string ) != 0 );
}
+#ifdef NA_ENABLE_DEPRECATED
/**
* na_core_utils_str_add_prefix:
* @prefix: the prefix to be prepended.
@@ -80,6 +83,7 @@ na_core_utils_boolean_from_string( const gchar *string )
* Returns: a new string which should be g_free() by the caller.
*
* Since: 2.30
+ * Deprecated: 3.2
*/
gchar *
na_core_utils_str_add_prefix( const gchar *prefix, const gchar *str )
@@ -99,6 +103,32 @@ na_core_utils_str_add_prefix( const gchar *prefix, const gchar *str )
return( g_string_free( result, FALSE ));
}
+/*
+ * split a text buffer in lines
+ */
+static GSList *
+text_to_string_list( const gchar *text, const gchar *separator, const gchar *default_value )
+{
+ GSList *strlist = NULL;
+ gchar **tokens;
+ gchar *tmp;
+ gchar *source = g_strdup( text );
+
+ tmp = g_strstrip( source );
+ if( !strlen( tmp ) && default_value ){
+ strlist = g_slist_append( strlist, g_strdup( default_value ));
+
+ } else {
+ tokens = g_strsplit( source, separator, -1 );
+ strlist = na_core_utils_slist_from_array(( const gchar ** ) tokens );
+ g_strfreev( tokens );
+ }
+
+ g_free( source );
+ return( strlist );
+}
+#endif
+
/**
* na_core_utils_str_collate:
* @str1: an UTF-8 encoded string.
@@ -745,31 +775,6 @@ na_core_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar *
return( g_string_free( tmp_string, FALSE ));
}
-/*
- * split a text buffer in lines
- */
-static GSList *
-text_to_string_list( const gchar *text, const gchar *separator, const gchar *default_value )
-{
- GSList *strlist = NULL;
- gchar **tokens;
- gchar *tmp;
- gchar *source = g_strdup( text );
-
- tmp = g_strstrip( source );
- if( !strlen( tmp ) && default_value ){
- strlist = g_slist_append( strlist, g_strdup( default_value ));
-
- } else {
- tokens = g_strsplit( source, separator, -1 );
- strlist = na_core_utils_slist_from_array(( const gchar ** ) tokens );
- g_strfreev( tokens );
- }
-
- g_free( source );
- return( strlist );
-}
-
/***
* na_core_utils_selcount_get_ope:
* @selcount: the selection count condition string.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]