Commit ab83a6c7 authored by Pierre Wieser's avatar Pierre Wieser

na_core_utils_xxx functions are renamed to fma_core_utils_xxx

parent 340af60e
......@@ -38,7 +38,7 @@ api_include_HEADERS = \
na-iio-provider.h \
\
fma-boxed.h \
na-core-utils.h \
fma-core-utils.h \
na-data-boxed.h \
na-data-def.h \
na-data-types.h \
......
......@@ -27,8 +27,8 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_FMA_BOXED_H__
#define __FILE_MANAGER_ACTIONS_API_FMA_BOXED_H__
#ifndef __FILE_MANAGER_ACTIONS_API_BOXED_H__
#define __FILE_MANAGER_ACTIONS_API_BOXED_H__
/**
* SECTION: boxed
......@@ -95,4 +95,4 @@ void fma_boxed_set_from_void ( FMABoxed *boxed, const void *value );
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_FMA_BOXED_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_BOXED_H__ */
......@@ -27,14 +27,14 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_CORE_UTILS_H__
#define __FILE_MANAGER_ACTIONS_API_NA_CORE_UTILS_H__
#ifndef __FILE_MANAGER_ACTIONS_API_CORE_UTILS_H__
#define __FILE_MANAGER_ACTIONS_API_CORE_UTILS_H__
/**
* SECTION: core-utils
* @title: Core Misc
* @short_description: The Core Library Utilities
* @include: nautilus-action/na-core-utils.h
* @include: file-manager-actions/fma-core-utils.h
*/
#include <glib.h>
......@@ -43,64 +43,64 @@ G_BEGIN_DECLS
/* boolean manipulation
*/
gboolean na_core_utils_boolean_from_string( const gchar *string );
gboolean fma_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 );
gchar *fma_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 );
void na_core_utils_str_split_first_word( const gchar *string, gchar **first, gchar **other );
gchar *na_core_utils_str_subst( const gchar *pattern, const gchar *key, const gchar *subst );
int fma_core_utils_str_collate( const gchar *str1, const gchar *str2 );
gchar *fma_core_utils_str_remove_char( const gchar *string, const gchar *to_remove );
gchar *fma_core_utils_str_remove_suffix( const gchar *string, const gchar *suffix );
void fma_core_utils_str_split_first_word( const gchar *string, gchar **first, gchar **other );
gchar *fma_core_utils_str_subst( const gchar *pattern, const gchar *key, const gchar *subst );
/* some functions to get or set GSList list of strings
*/
void na_core_utils_slist_add_message( GSList **list, const gchar *format, ... );
GSList *na_core_utils_slist_duplicate( GSList *slist );
void na_core_utils_slist_dump( const gchar *prefix, GSList *list );
GSList *na_core_utils_slist_from_array( const gchar **str_array );
GSList *na_core_utils_slist_from_split( const gchar *text, const gchar *separator );
gchar *na_core_utils_slist_join_at_end( GSList *slist, const gchar *link );
GSList *na_core_utils_slist_remove_ascii( GSList *slist, const gchar *text );
GSList *na_core_utils_slist_remove_utf8( GSList *slist, const gchar *text );
gchar **na_core_utils_slist_to_array( GSList *slist );
gchar *na_core_utils_slist_to_text( GSList *slist );
GSList *na_core_utils_slist_setup_element( GSList *list, const gchar *element, gboolean set );
guint na_core_utils_slist_count( GSList *list, const gchar *str );
gboolean na_core_utils_slist_find_negated( GSList *list, const gchar *str );
gboolean na_core_utils_slist_are_equal( GSList *a, GSList *b );
void na_core_utils_slist_free( GSList *slist );
void fma_core_utils_slist_add_message( GSList **list, const gchar *format, ... );
GSList *fma_core_utils_slist_duplicate( GSList *slist );
void fma_core_utils_slist_dump( const gchar *prefix, GSList *list );
GSList *fma_core_utils_slist_from_array( const gchar **str_array );
GSList *fma_core_utils_slist_from_split( const gchar *text, const gchar *separator );
gchar *fma_core_utils_slist_join_at_end( GSList *slist, const gchar *link );
GSList *fma_core_utils_slist_remove_ascii( GSList *slist, const gchar *text );
GSList *fma_core_utils_slist_remove_utf8( GSList *slist, const gchar *text );
gchar **fma_core_utils_slist_to_array( GSList *slist );
gchar *fma_core_utils_slist_to_text( GSList *slist );
GSList *fma_core_utils_slist_setup_element( GSList *list, const gchar *element, gboolean set );
guint fma_core_utils_slist_count( GSList *list, const gchar *str );
gboolean fma_core_utils_slist_find_negated( GSList *list, const gchar *str );
gboolean fma_core_utils_slist_are_equal( GSList *a, GSList *b );
void fma_core_utils_slist_free( GSList *slist );
/* some functions for GString manipulations.
*/
gchar *na_core_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar **list );
gchar *fma_core_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar **list );
/* selection count
*/
void na_core_utils_selcount_get_ope_int( const gchar *selection_count, gchar **ope, gchar **uint );
void fma_core_utils_selcount_get_ope_int( const gchar *selection_count, gchar **ope, gchar **uint );
/* directory management
*/
gboolean na_core_utils_dir_is_writable_path( const gchar *path );
gboolean na_core_utils_dir_is_writable_uri ( const gchar *uri );
void na_core_utils_dir_list_perms ( const gchar *path, const gchar *message );
void na_core_utils_dir_split_ext ( const gchar *string, gchar **first, gchar **ext );
gboolean fma_core_utils_dir_is_writable_path( const gchar *path );
gboolean fma_core_utils_dir_is_writable_uri ( const gchar *uri );
void fma_core_utils_dir_list_perms ( const gchar *path, const gchar *message );
void fma_core_utils_dir_split_ext ( const gchar *string, gchar **first, gchar **ext );
/* file management
*/
gboolean na_core_utils_file_delete ( const gchar *path );
gboolean na_core_utils_file_exists ( const gchar *uri );
gboolean na_core_utils_file_is_loadable ( const gchar *uri );
void na_core_utils_file_list_perms ( const gchar *path, const gchar *message );
gchar *na_core_utils_file_load_from_uri( const gchar *uri, gsize *length );
gboolean fma_core_utils_file_delete ( const gchar *path );
gboolean fma_core_utils_file_exists ( const gchar *uri );
gboolean fma_core_utils_file_is_loadable ( const gchar *uri );
void fma_core_utils_file_list_perms ( const gchar *path, const gchar *message );
gchar *fma_core_utils_file_load_from_uri( const gchar *uri, gsize *length );
/* miscellaneous
*/
void na_core_utils_print_version( void );
void fma_core_utils_print_version( void );
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_CORE_UTILS_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_CORE_UTILS_H__ */
......@@ -54,7 +54,7 @@ libna_core_la_SOURCES = \
na-about.c \
na-about.h \
fma-boxed.c \
na-core-utils.c \
fma-core-utils.c \
na-data-boxed.c \
na-data-def.c \
na-data-types.c \
......
......@@ -36,7 +36,7 @@
#include <api/fma-boxed.h>
#include <api/na-data-types.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
/* private class data
*/
......@@ -701,7 +701,7 @@ fma_boxed_get_string( const FMABoxed *boxed )
* @boxed: the #FMABoxed structure.
*
* Returns: a newly allocated string list if @boxed is of %NA_DATA_TYPE_STRING_LIST
* type, which should be na_core_utils_slist_free() by the caller, %NULL else.
* type, which should be fma_core_utils_slist_free() by the caller, %NULL else.
*
* Since: 3.1
*/
......@@ -800,7 +800,7 @@ fma_boxed_get_as_value( const FMABoxed *boxed, GValue *value )
* If of type NA_DATA_TYPE_STRING (resp. NA_DATA_TYPE_LOCALE_STRING,
* NA_DATA_TYPE_STRING_LIST or NA_DATA_TYPE_UINT_LIST), then the content
* is returned in a newly allocated value, which should be g_free() (resp.
* g_free(), na_core_utils_slist_free(), g_list_free()) by the caller.
* g_free(), fma_core_utils_slist_free(), g_list_free()) by the caller.
*
* Since: 3.1
*/
......@@ -932,7 +932,7 @@ bool_free( FMABoxed *boxed )
static void
bool_from_string( FMABoxed *boxed, const gchar *string )
{
boxed->private->u.boolean = na_core_utils_boolean_from_string( string );
boxed->private->u.boolean = fma_core_utils_boolean_from_string( string );
}
static void
......@@ -1146,14 +1146,14 @@ string_list_copy( FMABoxed *dest, const FMABoxed *src )
if( dest->private->is_set ){
string_list_free( dest );
}
dest->private->u.string_list = na_core_utils_slist_duplicate( src->private->u.string_list );
dest->private->u.string_list = fma_core_utils_slist_duplicate( src->private->u.string_list );
dest->private->is_set = TRUE;
}
static void
string_list_free( FMABoxed *boxed )
{
na_core_utils_slist_free( boxed->private->u.string_list );
fma_core_utils_slist_free( boxed->private->u.string_list );
boxed->private->u.string_list = NULL;
boxed->private->is_set = FALSE;
}
......@@ -1174,7 +1174,7 @@ string_list_from_string( FMABoxed *boxed, const gchar *string )
if( array ){
i = ( gchar ** ) array;
while( *i ){
if( !na_core_utils_slist_count( boxed->private->u.string_list, ( const gchar * )( *i ))){
if( !fma_core_utils_slist_count( boxed->private->u.string_list, ( const gchar * )( *i ))){
boxed->private->u.string_list = g_slist_prepend( boxed->private->u.string_list, g_strdup( *i ));
}
i++;
......@@ -1199,7 +1199,7 @@ string_list_from_void( FMABoxed *boxed, const void *value )
value_slist = ( GSList * ) value;
for( it = value_slist ; it ; it = it->next ){
if( !na_core_utils_slist_count( boxed->private->u.string_list, ( const gchar * ) it->data )){
if( !fma_core_utils_slist_count( boxed->private->u.string_list, ( const gchar * ) it->data )){
boxed->private->u.string_list = g_slist_prepend( boxed->private->u.string_list, g_strdup(( const gchar * ) it->data ));
}
}
......@@ -1234,13 +1234,13 @@ string_list_to_string( const FMABoxed *boxed )
static GSList *
string_list_to_string_list( const FMABoxed *boxed )
{
return( na_core_utils_slist_duplicate( boxed->private->u.string_list ));
return( fma_core_utils_slist_duplicate( boxed->private->u.string_list ));
}
static void
string_list_to_value( const FMABoxed *boxed, GValue *value )
{
g_value_set_pointer( value, na_core_utils_slist_duplicate( boxed->private->u.string_list ));
g_value_set_pointer( value, fma_core_utils_slist_duplicate( boxed->private->u.string_list ));
}
static void *
......@@ -1249,7 +1249,7 @@ string_list_to_void( const FMABoxed *boxed )
void *value = NULL;
if( boxed->private->u.string_list ){
value = na_core_utils_slist_duplicate( boxed->private->u.string_list );
value = fma_core_utils_slist_duplicate( boxed->private->u.string_list );
}
return( value );
......@@ -1264,7 +1264,7 @@ locale_are_equal( const FMABoxed *a, const FMABoxed *b )
if( !a->private->u.string || !b->private->u.string ){
return( FALSE );
}
return( na_core_utils_str_collate( a->private->u.string, b->private->u.string ) == 0 );
return( fma_core_utils_str_collate( a->private->u.string, b->private->u.string ) == 0 );
}
static gboolean
......
......@@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-gconf-utils.h>
#include <api/na-data-def.h>
#include <api/na-data-types.h>
......@@ -582,7 +582,7 @@ bool_spec( const NADataDef *def )
def->name,
gettext( def->short_label ),
gettext( def->long_label ),
na_core_utils_boolean_from_string( def->default_value ),
fma_core_utils_boolean_from_string( def->default_value ),
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
}
......@@ -593,7 +593,7 @@ bool_is_default( const NADataBoxed *boxed )
gboolean default_value;
if( boxed->private->data_def->default_value && strlen( boxed->private->data_def->default_value )){
default_value = na_core_utils_boolean_from_string( boxed->private->data_def->default_value );
default_value = fma_core_utils_boolean_from_string( boxed->private->data_def->default_value );
is_default = ( default_value == fma_boxed_get_boolean( FMA_BOXED( boxed )));
}
......@@ -758,7 +758,7 @@ locale_is_default( const NADataBoxed *boxed )
if( boxed->private->data_def->default_value && g_utf8_strlen( boxed->private->data_def->default_value, -1 )){
if( value && strlen( value )){
/* default value is not null and string has something */
is_default = ( na_core_utils_str_collate( value, boxed->private->data_def->default_value ) == 0 );
is_default = ( fma_core_utils_str_collate( value, boxed->private->data_def->default_value ) == 0 );
} else {
/* default value is not null, but string is null */
......
......@@ -32,7 +32,7 @@
#endif
#include <api/na-data-types.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
typedef struct {
guint type;
......
......@@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-data-boxed.h>
#include <api/na-data-types.h>
#include <api/na-iio-provider.h>
......@@ -756,7 +756,7 @@ na_factory_object_get_as_value( const NAIFactoryObject *object, const gchar *nam
*
* If the type of the value is NA_DATA_TYPE_STRING or NA_DATA_TYPE_LOCALE_STRING
* (resp. NA_DATA_TYPE_STRING_LIST), then the returned value is a newly allocated
* string (resp. GSList) and should be g_free() (resp. na_core_utils_slist_free())
* string (resp. GSList) and should be g_free() (resp. fma_core_utils_slist_free())
* by the caller.
*/
void *
......
......@@ -35,7 +35,7 @@
#include <string.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-gconf-utils.h>
static void dump_entry( GConfEntry *entry, void *user_data );
......@@ -85,7 +85,7 @@ na_gconf_utils_get_subdirs( GConfClient *gconf, const gchar *path )
void
na_gconf_utils_free_subdirs( GSList *subdirs )
{
na_core_utils_slist_free( subdirs );
fma_core_utils_slist_free( subdirs );
}
/**
......@@ -255,7 +255,7 @@ na_gconf_utils_get_string_from_entries( GSList *entries, const gchar *entry, gch
* If the entry was not found, or was not of string list type, @value
* is set to %NULL.
*
* If @value is returned not NULL, it should be na_core_utils_slist_free()
* If @value is returned not NULL, it should be fma_core_utils_slist_free()
* by the caller.
*
* Since: 2.30
......@@ -502,7 +502,7 @@ na_gconf_utils_read_string( GConfClient *gconf, const gchar *path, gboolean use_
* Returns: a list of strings,
* or %NULL if the entry was not found or was not of string list type.
*
* The returned list must be released with na_core_utils_slist_free().
* The returned list must be released with fma_core_utils_slist_free().
*
* Since: 2.30
*/
......@@ -730,7 +730,7 @@ na_gconf_utils_remove_entry( GConfClient *gconf, const gchar *path, gchar **mess
* to a list of strings.
*
* Returns: a newly allocated list of strings, which should be
* na_core_utils_slist_free() by the caller, or %NULL if the provided
* fma_core_utils_slist_free() by the caller, or %NULL if the provided
* string was not of the GConf form.
*
* Since: 2.30
......@@ -757,7 +757,7 @@ na_gconf_utils_slist_from_string( const gchar *value )
tmp_string += 1;
tmp_string[strlen(tmp_string)-1] = '\0';
slist = na_core_utils_slist_from_split( tmp_string, "," );
slist = fma_core_utils_slist_from_split( tmp_string, "," );
return( slist );
}
......
......@@ -47,7 +47,7 @@
#include <libnautilus-extension/nautilus-file-info.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-object-api.h>
#include "na-desktop-environment.h"
......@@ -318,7 +318,7 @@ na_icontext_check_mimetypes( const NAIContext *context )
na_object_set_all_mimetypes( context, is_all );
na_core_utils_slist_free( mimetypes );
fma_core_utils_slist_free( mimetypes );
}
/**
......@@ -377,9 +377,9 @@ na_icontext_set_scheme( NAIContext *context, const gchar *scheme, gboolean selec
g_return_if_fail( NA_IS_ICONTEXT( context ));
schemes = na_object_get_schemes( context );
schemes = na_core_utils_slist_setup_element( schemes, scheme, selected );
schemes = fma_core_utils_slist_setup_element( schemes, scheme, selected );
na_object_set_schemes( context, schemes );
na_core_utils_slist_free( schemes );
fma_core_utils_slist_free( schemes );
}
/**
......@@ -400,9 +400,9 @@ na_icontext_set_only_desktop( NAIContext *context, const gchar *desktop, gboolea
g_return_if_fail( NA_IS_ICONTEXT( context ));
desktops = na_object_get_only_show_in( context );
desktops = na_core_utils_slist_setup_element( desktops, desktop, selected );
desktops = fma_core_utils_slist_setup_element( desktops, desktop, selected );
na_object_set_only_show_in( context, desktops );
na_core_utils_slist_free( desktops );
fma_core_utils_slist_free( desktops );
}
/**
......@@ -423,9 +423,9 @@ na_icontext_set_not_desktop( NAIContext *context, const gchar *desktop, gboolean
g_return_if_fail( NA_IS_ICONTEXT( context ));
desktops = na_object_get_not_show_in( context );
desktops = na_core_utils_slist_setup_element( desktops, desktop, selected );
desktops = fma_core_utils_slist_setup_element( desktops, desktop, selected );
na_object_set_not_show_in( context, desktops );
na_core_utils_slist_free( desktops );
fma_core_utils_slist_free( desktops );
}
/**
......@@ -446,10 +446,10 @@ na_icontext_replace_folder( NAIContext *context, const gchar *old, const gchar *
g_return_if_fail( NA_IS_ICONTEXT( context ));
folders = na_object_get_folders( context );
folders = na_core_utils_slist_remove_utf8( folders, old );
folders = fma_core_utils_slist_remove_utf8( folders, old );
folders = g_slist_append( folders, ( gpointer ) g_strdup( new ));
na_object_set_folders( context, folders );
na_core_utils_slist_free( folders );
fma_core_utils_slist_free( folders );
}
static gboolean
......@@ -535,21 +535,21 @@ is_candidate_for_show_in( const NAIContext *object, guint target, GList *files )
}
if( only_in && g_slist_length( only_in )){
ok = ( na_core_utils_slist_count( only_in, environment ) > 0 );
ok = ( fma_core_utils_slist_count( only_in, environment ) > 0 );
} else if( not_in && g_slist_length( not_in )){
ok = ( na_core_utils_slist_count( not_in, environment ) == 0 );
ok = ( fma_core_utils_slist_count( not_in, environment ) == 0 );
}
if( !ok ){
gchar *only_str = na_core_utils_slist_to_text( only_in );
gchar *not_str = na_core_utils_slist_to_text( not_in );
gchar *only_str = fma_core_utils_slist_to_text( only_in );
gchar *not_str = fma_core_utils_slist_to_text( not_in );
g_debug( "%s: object is not candidate because OnlyShowIn=%s, NotShowIn=%s", thisfn, only_str, not_str );
g_free( not_str );
g_free( only_str );
}
na_core_utils_slist_free( not_in );
na_core_utils_slist_free( only_in );
fma_core_utils_slist_free( not_in );
fma_core_utils_slist_free( only_in );
return( ok );
}
......@@ -761,7 +761,7 @@ is_candidate_for_mimetypes( const NAIContext *object, guint target, GList *files
}
if( !match ){
gchar *mimetypes_str = na_core_utils_slist_to_text( mimetypes );
gchar *mimetypes_str = fma_core_utils_slist_to_text( mimetypes );
g_debug( "%s: no positive match found for Mimetypes=%s", thisfn, mimetypes_str );
g_free( mimetypes_str );
ok = FALSE;
......@@ -777,7 +777,7 @@ is_candidate_for_mimetypes( const NAIContext *object, guint target, GList *files
g_free( ftype );
}
na_core_utils_slist_free( mimetypes );
fma_core_utils_slist_free( mimetypes );
}
return( ok );
......@@ -896,7 +896,7 @@ is_candidate_for_basenames( const NAIContext *object, guint target, GList *files
}
if( !match ){
gchar *basenames_str = na_core_utils_slist_to_text( basenames );
gchar *basenames_str = fma_core_utils_slist_to_text( basenames );
g_debug( "%s: no positive match found for Basenames=%s", thisfn, basenames_str );
g_free( basenames_str );
ok = FALSE;
......@@ -907,7 +907,7 @@ is_candidate_for_basenames( const NAIContext *object, guint target, GList *files
}
}
na_core_utils_slist_free( basenames );
fma_core_utils_slist_free( basenames );
}
return( ok );
......@@ -976,7 +976,7 @@ is_candidate_for_schemes( const NAIContext *object, guint target, GList *files )
for( it = files ; it && ok ; it = it->next ){
gchar *scheme = na_selected_info_get_uri_scheme( NA_SELECTED_INFO( it->data ));
if( na_core_utils_slist_count( distincts, scheme ) == 0 ){
if( fma_core_utils_slist_count( distincts, scheme ) == 0 ){
GSList *is;
gchar *pattern;
gboolean match, positive;
......@@ -1005,16 +1005,16 @@ is_candidate_for_schemes( const NAIContext *object, guint target, GList *files )
g_free( scheme );
}
na_core_utils_slist_free( distincts );
fma_core_utils_slist_free( distincts );
}
if( !ok ){
gchar *schemes_str = na_core_utils_slist_to_text( schemes );
gchar *schemes_str = fma_core_utils_slist_to_text( schemes );
g_debug( "%s: object is not candidate because Schemes=%s", thisfn, schemes_str );
g_free( schemes_str );
}
na_core_utils_slist_free( schemes );
fma_core_utils_slist_free( schemes );
}
g_debug( "%s: ok=%s", thisfn, ok ? "True":"False" );
......@@ -1059,7 +1059,7 @@ is_candidate_for_folders( const NAIContext *object, guint target, GList *files )
for( it = files ; it && ok ; it = it->next ){
gchar *dirname = na_selected_info_get_dirname( NA_SELECTED_INFO( it->data ));
if( na_core_utils_slist_count( distincts, dirname ) == 0 ){
if( fma_core_utils_slist_count( distincts, dirname ) == 0 ){
g_debug( "%s: examining new distinct selected dirname=%s", thisfn, dirname );
GSList *id;
......@@ -1092,16 +1092,16 @@ is_candidate_for_folders( const NAIContext *object, guint target, GList *files )
g_free( dirname );
}
na_core_utils_slist_free( distincts );
fma_core_utils_slist_free( distincts );
}
if( !ok ){
gchar *folders_str = na_core_utils_slist_to_text( folders );
gchar *folders_str = fma_core_utils_slist_to_text( folders );
g_debug( "%s: object is not candidate because Folders=%s", thisfn, folders_str );
g_free( folders_str );
}
na_core_utils_slist_free( folders );
fma_core_utils_slist_free( folders );
}
return( ok );
......@@ -1150,12 +1150,12 @@ is_candidate_for_capabilities( const NAIContext *object, guint target, GList *fi
}
if( !ok ){
gchar *capabilities_str = na_core_utils_slist_to_text( capabilities );
gchar *capabilities_str = fma_core_utils_slist_to_text( capabilities );
g_debug( "%s: object is not candidate because Capabilities=%s", thisfn, capabilities_str );
g_free( capabilities_str );
}
na_core_utils_slist_free( capabilities );
fma_core_utils_slist_free( capabilities );
}
return( ok );
......@@ -1169,7 +1169,7 @@ is_valid_basenames( const NAIContext *object )
basenames = na_object_get_basenames( object );
valid = basenames && g_slist_length( basenames ) > 0;
na_core_utils_slist_free( basenames );
fma_core_utils_slist_free( basenames );
if( !valid ){
na_object_debug_invalid( object, "basenames" );
......@@ -1229,7 +1229,7 @@ is_valid_mimetypes( const NAIContext *object )
na_object_debug_invalid( object, "mimetypes" );
}
na_core_utils_slist_free( mimetypes );
fma_core_utils_slist_free( mimetypes );
return( valid );
}
......@@ -1242,7 +1242,7 @@ is_valid_schemes( const NAIContext *object )
schemes = na_object_get_schemes( object );
valid = schemes && g_slist_length( schemes ) > 0;
na_core_utils_slist_free( schemes );
fma_core_utils_slist_free( schemes );
if( !valid ){
na_object_debug_invalid( object, "schemes" );
......@@ -1259,7 +1259,7 @@ is_valid_folders( const NAIContext *object )
folders = na_object_get_folders( object );
valid = folders && g_slist_length( folders ) > 0;
na_core_utils_slist_free( folders );
fma_core_utils_slist_free( folders );
if( !valid ){
na_object_debug_invalid( object, "folders" );
......
......@@ -208,7 +208,7 @@ na_ifactory_object_get_data_groups( const NAIFactoryObject *object )
*
* If the type of the value is %NA_DATA_TYPE_STRING, %NA_DATA_TYPE_LOCALE_STRING,
* or %NA_DATA_TYPE_STRING_LIST, then the returned value is a newly allocated
* one and should be g_free() (resp. na_core_utils_slist_free()) by the
* one and should be g_free() (resp. fma_core_utils_slist_free()) by the
* caller.
*
* Returns: the searched value.
......
......@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-iimporter.h>
#include <api/na-object-api.h>
......@@ -236,7 +236,7 @@ na_iimporter_manage_import_mode( NAIImporterManageImportModeParms *parms )
} else {
renumber_label_item( parms );
na_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered because the caller did not provide any check function." ));
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered because the caller did not provide any check function." ));
parms->import_mode = IMPORTER_MODE_RENUMBER;
}
......@@ -251,7 +251,7 @@ na_iimporter_manage_import_mode( NAIImporterManageImportModeParms *parms )
} else {
renumber_label_item( parms );
na_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered because the caller did not provide any ask user function." ));
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered because the caller did not provide any ask user function." ));
parms->import_mode = IMPORTER_MODE_RENUMBER;
}
......@@ -270,22 +270,22 @@ na_iimporter_manage_import_mode( NAIImporterManageImportModeParms *parms )
case IMPORTER_MODE_RENUMBER:
renumber_label_item( parms );
if( parms->asked_mode == IMPORTER_MODE_ASK ){
na_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered due to user request." ));
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Item was renumbered due to user request." ));
}
break;
case IMPORTER_MODE_OVERRIDE:
if( parms->asked_mode == IMPORTER_MODE_ASK ){
na_core_utils_slist_add_message( &parms->messages, "%s", _( "Existing item was overriden due to user request." ));
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Existing item was overriden due to user request." ));
}
break;
case IMPORTER_MODE_NO_IMPORT:
default:
id = na_object_get_id( parms->imported );
na_core_utils_slist_add_message( &parms->messages, _( "Item %s already exists." ), id );
fma_core_utils_slist_add_message( &parms->messages, _( "Item %s already exists." ), id );
if( parms->asked_mode == IMPORTER_MODE_ASK ){
na_core_utils_slist_add_message( &parms->messages, "%s", _( "Import was canceled due to user request." ));
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Import was canceled due to user request." ));
}
g_free( id );
code = IMPORTER_CODE_CANCELLED;
......
......@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <string.h>
#include <api/na-core-utils.h>
#include <api/fma-core-utils.h>
#include <api/na-iimporter.h>
#include <api/na-object-api.h>
......@@ -197,7 +197,7 @@ void
na_importer_free_result( NAImporterResult *result )
{
g_free( result->uri );
na_core_utils_slist_free( result->messages );
fma_core_utils_slist_free( result->messages );
g_free( result );
}
......@@ -243,14 +243,14 @@ import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri )
provider_parms.messages = NULL;
} else if( code == IMPORTER_CODE_NOT_LOADABLE ){
na_core_utils_slist_free( all_messages );
fma_core_utils_slist_free( all_messages );
all_messages = NULL;
na_core_utils_slist_free( provider_parms.messages );
fma_core_utils_slist_free( provider_parms.messages );
provider_parms.messages = NULL;
na_core_utils_slist_add_message( &all_messages, ERR_NOT_LOADABLE, ( const gchar * ) uri );
fma_core_utils_slist_add_message( &all_messages, ERR_NOT_LOADABLE, ( const gchar * ) uri );
} else {
na_core_utils_slist_free( all_messages );
fma_core_utils_slist_free( all_messages );
all_messages = provider_parms.messages;
provider = NA_IIMPORTER( im->data );
}
......@@ -287,7 +287,7 @@ manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserPar
*/
if( !parms->check_fn ){
renumber_label_item( result->imported );
na_core_utils_slist_add_message(
fma_core_utils_slist_add_message(
&result->messages,
"%s",
_( "Item was renumbered because the caller did not provide any check function." ));
......@@ -320,7 +320,7 @@ manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserPar
case IMPORTER_MODE_RENUMBER:
renumber_label_item( result->imported );
if( parms->preferred_mode == IMPORTER_MODE_ASK ){