[nautilus-actions/file-manager-actions] NAIOProvider class is renamed to FMAIOProvider
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NAIOProvider class is renamed to FMAIOProvider
- Date: Mon, 7 Sep 2015 22:10:48 +0000 (UTC)
commit f35932a0a811e755f688454aa278e1d77fc2aeb4
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 00:07:15 2015 +0200
NAIOProvider class is renamed to FMAIOProvider
src/api/fma-iio-provider.h | 4 +-
src/core/Makefile.am | 4 +-
src/core/fma-iio-provider.c | 2 +-
src/core/{na-io-provider.c => fma-io-provider.c} | 286 +++++++++++-----------
src/core/fma-io-provider.h | 121 +++++++++
src/core/fma-object-item-factory.c | 4 +-
src/core/fma-object-item.c | 8 +-
src/core/na-io-provider.h | 121 ---------
src/core/na-pivot.c | 6 +-
src/core/na-pivot.h | 2 +-
src/core/na-updater.c | 20 +-
src/nact/nact-iaction-tab.c | 2 +-
src/nact/nact-iproperties-tab.c | 6 +-
src/nact/nact-menu-edit.c | 4 +-
src/nact/nact-menu-file.c | 6 +-
src/nact/nact-menu.c | 6 +-
src/nact/nact-providers-list.c | 24 +-
src/nact/nact-statusbar.c | 4 +-
src/utils/nautilus-actions-new.c | 6 +-
19 files changed, 318 insertions(+), 318 deletions(-)
---
diff --git a/src/api/fma-iio-provider.h b/src/api/fma-iio-provider.h
index 25e829b..92a1c82 100644
--- a/src/api/fma-iio-provider.h
+++ b/src/api/fma-iio-provider.h
@@ -428,7 +428,7 @@ typedef struct {
FMAIIOProviderInterface;
/* -- adding a new status here should imply also adding a new tooltip
- * -- in na_io_provider_get_readonly_tooltip().
+ * -- in fma_io_provider_get_readonly_tooltip().
*/
/**
* FMAIIOProviderWritabilityStatus:
@@ -467,7 +467,7 @@ typedef enum {
FMAIIOProviderWritabilityStatus;
/* -- adding a new code here should imply also adding a new label
- * -- in #na_io_provider_get_return_code_label().
+ * -- in #fma_io_provider_get_return_code_label().
*/
/**
* FMAIIOProviderOperationStatus:
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 18fcfac..838c429 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -90,8 +90,8 @@ libna_core_la_SOURCES = \
fma-importer.h \
fma-importer-ask.c \
fma-importer-ask.h \
- na-io-provider.c \
- na-io-provider.h \
+ fma-io-provider.c \
+ fma-io-provider.h \
na-ioption.c \
na-ioption.h \
na-ioptions-list.c \
diff --git a/src/core/fma-iio-provider.c b/src/core/fma-iio-provider.c
index ef340ad..9f29b1c 100644
--- a/src/core/fma-iio-provider.c
+++ b/src/core/fma-iio-provider.c
@@ -33,7 +33,7 @@
#include <api/fma-iio-provider.h>
-#include "na-io-provider.h"
+#include "fma-io-provider.h"
/* private interface data
*/
diff --git a/src/core/na-io-provider.c b/src/core/fma-io-provider.c
similarity index 81%
rename from src/core/na-io-provider.c
rename to src/core/fma-io-provider.c
index ef6aac3..e9bb089 100644
--- a/src/core/na-io-provider.c
+++ b/src/core/fma-io-provider.c
@@ -39,17 +39,17 @@
#include <api/fma-core-utils.h>
#include "na-iprefs.h"
-#include "na-io-provider.h"
+#include "fma-io-provider.h"
/* private class data
*/
-struct _NAIOProviderClassPrivate {
+struct _FMAIOProviderClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAIOProviderPrivate {
+struct _FMAIOProviderPrivate {
gboolean dispose_has_run;
gchar *id;
FMAIIOProvider *provider;
@@ -58,13 +58,13 @@ struct _NAIOProviderPrivate {
guint reason;
};
-/* NAIOProvider properties
+/* FMAIOProvider properties
*/
enum {
IO_PROVIDER_PROP_ID_ID = 1,
};
-#define IO_PROVIDER_PROP_ID "na-io-provider-prop-id"
+#define IO_PROVIDER_PROP_ID "fma-io-provider-prop-id"
static const gchar *st_enter_bug = N_( "Please, be kind enough to fill out a bug report on "
"https://bugzilla.gnome.org/enter_bug.cgi?product=file-manager-actions." );
@@ -73,7 +73,7 @@ static GObjectClass *st_parent_class = NULL;
static GList *st_io_providers = NULL;
static GType register_type( void );
-static void class_init( NAIOProviderClass *klass );
+static void class_init( FMAIOProviderClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_constructed( GObject *object );
static void instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec
*spec );
@@ -82,28 +82,28 @@ static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
#if 0
-static void dump( const NAIOProvider *provider );
+static void dump( const FMAIOProvider *provider );
static void dump_providers_list( GList *providers );
#endif
-static NAIOProvider *io_provider_new( const NAPivot *pivot, FMAIIOProvider *module, const gchar *id );
+static FMAIOProvider *io_provider_new( const NAPivot *pivot, FMAIIOProvider *module, const gchar *id );
static GList *io_providers_list_add_from_plugins( const NAPivot *pivot, GList *list );
static GList *io_providers_list_add_from_prefs( const NAPivot *pivot, GList *objects_list );
static GSList *io_providers_get_from_prefs( void );
static GList *io_providers_list_add_from_write_order( const NAPivot *pivot, GList *objects_list );
static GList *io_providers_list_append_object( const NAPivot *pivot, GList *list, FMAIIOProvider
*module, const gchar *id );
-static void io_providers_list_set_module( const NAPivot *pivot, NAIOProvider *provider_object,
FMAIIOProvider *provider_module );
-static gboolean is_conf_writable( const NAIOProvider *provider, const NAPivot *pivot, gboolean
*mandatory );
-static gboolean is_finally_writable( const NAIOProvider *provider, const NAPivot *pivot, guint *reason
);
+static void io_providers_list_set_module( const NAPivot *pivot, FMAIOProvider *provider_object,
FMAIIOProvider *provider_module );
+static gboolean is_conf_writable( const FMAIOProvider *provider, const NAPivot *pivot, gboolean
*mandatory );
+static gboolean is_finally_writable( const FMAIOProvider *provider, const NAPivot *pivot, guint *reason
);
static GList *load_items_filter_unwanted_items( const NAPivot *pivot, GList *merged, guint
loadable_set );
static GList *load_items_filter_unwanted_items_rec( GList *merged, guint loadable_set );
static GList *load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **messages
);
static GList *load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty,
FMAObjectItem *parent );
static GList *load_items_hierarchy_sort( const NAPivot *pivot, GList *tree, GCompareFunc fn );
static gint peek_item_by_id_compare( const FMAObject *obj, const gchar *id );
-static NAIOProvider *peek_provider_by_id( const GList *providers, const gchar *id );
+static FMAIOProvider *peek_provider_by_id( const GList *providers, const gchar *id );
GType
-na_io_provider_get_type( void )
+fma_io_provider_get_type( void )
{
static GType object_type = 0;
@@ -117,32 +117,32 @@ na_io_provider_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_io_provider_register_type";
+ static const gchar *thisfn = "fma_io_provider_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAIOProviderClass ),
+ sizeof( FMAIOProviderClass ),
( GBaseInitFunc ) NULL,
( GBaseFinalizeFunc ) NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAIOProvider ),
+ sizeof( FMAIOProvider ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "NAIOProvider", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMAIOProvider", &info, 0 );
return( type );
}
static void
-class_init( NAIOProviderClass *klass )
+class_init( FMAIOProviderClass *klass )
{
- static const gchar *thisfn = "na_io_provider_class_init";
+ static const gchar *thisfn = "fma_io_provider_class_init";
GObjectClass *object_class;
GParamSpec *spec;
@@ -164,23 +164,23 @@ class_init( NAIOProviderClass *klass )
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE );
g_object_class_install_property( object_class, IO_PROVIDER_PROP_ID_ID, spec );
- klass->private = g_new0( NAIOProviderClassPrivate, 1 );
+ klass->private = g_new0( FMAIOProviderClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "na_io_provider_instance_init";
- NAIOProvider *self;
+ static const gchar *thisfn = "fma_io_provider_instance_init";
+ FMAIOProvider *self;
- g_return_if_fail( NA_IS_IO_PROVIDER( instance ));
+ g_return_if_fail( FMA_IS_IO_PROVIDER( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = NA_IO_PROVIDER( instance );
+ self = FMA_IO_PROVIDER( instance );
- self->private = g_new0( NAIOProviderPrivate, 1 );
+ self->private = g_new0( FMAIOProviderPrivate, 1 );
self->private->dispose_has_run = FALSE;
self->private->id = NULL;
@@ -193,12 +193,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_constructed( GObject *object )
{
- static const gchar *thisfn = "na_io_provider_instance_constructed";
- NAIOProviderPrivate *priv;
+ static const gchar *thisfn = "fma_io_provider_instance_constructed";
+ FMAIOProviderPrivate *priv;
- g_return_if_fail( NA_IS_IO_PROVIDER( object ));
+ g_return_if_fail( FMA_IS_IO_PROVIDER( object ));
- priv = NA_IO_PROVIDER( object )->private;
+ priv = FMA_IO_PROVIDER( object )->private;
if( !priv->dispose_has_run ){
@@ -217,10 +217,10 @@ instance_constructed( GObject *object )
static void
instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec *spec )
{
- NAIOProvider *self;
+ FMAIOProvider *self;
- g_return_if_fail( NA_IS_IO_PROVIDER( object ));
- self = NA_IO_PROVIDER( object );
+ g_return_if_fail( FMA_IS_IO_PROVIDER( object ));
+ self = FMA_IO_PROVIDER( object );
if( !self->private->dispose_has_run ){
@@ -239,10 +239,10 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
static void
instance_set_property( GObject *object, guint property_id, const GValue *value, GParamSpec *spec )
{
- NAIOProvider *self;
+ FMAIOProvider *self;
- g_return_if_fail( NA_IS_IO_PROVIDER( object ));
- self = NA_IO_PROVIDER( object );
+ g_return_if_fail( FMA_IS_IO_PROVIDER( object ));
+ self = FMA_IO_PROVIDER( object );
if( !self->private->dispose_has_run ){
@@ -258,12 +258,12 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "na_io_provider_instance_dispose";
- NAIOProvider *self;
+ static const gchar *thisfn = "fma_io_provider_instance_dispose";
+ FMAIOProvider *self;
- g_return_if_fail( NA_IS_IO_PROVIDER( object ));
+ g_return_if_fail( FMA_IS_IO_PROVIDER( object ));
- self = NA_IO_PROVIDER( object );
+ self = FMA_IO_PROVIDER( object );
if( !self->private->dispose_has_run ){
@@ -288,14 +288,14 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "na_io_provider_instance_finalize";
- NAIOProvider *self;
+ static const gchar *thisfn = "fma_io_provider_instance_finalize";
+ FMAIOProvider *self;
- g_return_if_fail( NA_IS_IO_PROVIDER( object ));
+ g_return_if_fail( FMA_IS_IO_PROVIDER( object ));
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- self = NA_IO_PROVIDER( object );
+ self = FMA_IO_PROVIDER( object );
g_free( self->private->id );
@@ -308,25 +308,25 @@ instance_finalize( GObject *object )
}
/*
- * na_io_provider_find_writable_io_provider:
+ * fma_io_provider_find_writable_io_provider:
* @pivot: the #NAPivot instance.
*
* Returns: the first willing and able to write I/O provider, or NULL.
*
- * The returned provider is owned by NAIOProvider class, and should not
+ * The returned provider is owned by FMAIOProvider class, and should not
* be released by the caller.
*/
-NAIOProvider *
-na_io_provider_find_writable_io_provider( const NAPivot *pivot )
+FMAIOProvider *
+fma_io_provider_find_writable_io_provider( const NAPivot *pivot )
{
const GList *providers;
const GList *ip;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
- providers = na_io_provider_get_io_providers_list( pivot );
+ providers = fma_io_provider_get_io_providers_list( pivot );
for( ip = providers ; ip ; ip = ip->next ){
- provider = ( NAIOProvider * ) ip->data;
+ provider = ( FMAIOProvider * ) ip->data;
if( provider->private->writable ){
return( provider );
}
@@ -336,28 +336,28 @@ na_io_provider_find_writable_io_provider( const NAPivot *pivot )
}
/*
- * na_io_provider_find_io_provider_by_id:
+ * fma_io_provider_find_io_provider_by_id:
* @pivot: the #NAPivot instance.
* @id: the identifier of the searched I/O provider.
*
* Returns: the I/O provider, or NULL.
*
- * The returned provider is owned by NAIOProvider class, and should not
+ * The returned provider is owned by FMAIOProvider class, and should not
* be released by the caller.
*/
-NAIOProvider *
-na_io_provider_find_io_provider_by_id( const NAPivot *pivot, const gchar *id )
+FMAIOProvider *
+fma_io_provider_find_io_provider_by_id( const NAPivot *pivot, const gchar *id )
{
const GList *providers;
const GList *ip;
- NAIOProvider *provider;
- NAIOProvider *found;
+ FMAIOProvider *provider;
+ FMAIOProvider *found;
- providers = na_io_provider_get_io_providers_list( pivot );
+ providers = fma_io_provider_get_io_providers_list( pivot );
found = NULL;
for( ip = providers ; ip && !found ; ip = ip->next ){
- provider = NA_IO_PROVIDER( ip->data );
+ provider = FMA_IO_PROVIDER( ip->data );
if( !strcmp( provider->private->id, id )){
found = provider;
}
@@ -367,13 +367,13 @@ na_io_provider_find_io_provider_by_id( const NAPivot *pivot, const gchar *id )
}
/*
- * na_io_provider_get_io_providers_list:
+ * fma_io_provider_get_io_providers_list:
* @pivot: the current #NAPivot instance.
*
* Build (if not already done) the write-ordered list of currently
- * available NAIOProvider objects.
+ * available FMAIOProvider objects.
*
- * A NAIOProvider object may be created:
+ * A FMAIOProvider object may be created:
* - either because we have loaded a plugin which claims to implement the
* FMAIIOProvider interface;
* - or because an i/o provider identifier has been found in preferences.
@@ -385,11 +385,11 @@ na_io_provider_find_io_provider_by_id( const NAPivot *pivot, const gchar *id )
*
* Returns: the list of I/O providers.
*
- * The returned list is owned by #NAIOProvider class, and should not be
+ * The returned list is owned by #FMAIOProvider class, and should not be
* released by the caller.
*/
const GList *
-na_io_provider_get_io_providers_list( const NAPivot *pivot )
+fma_io_provider_get_io_providers_list( const NAPivot *pivot )
{
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
@@ -403,7 +403,7 @@ na_io_provider_get_io_providers_list( const NAPivot *pivot )
}
/*
- * adding from write-order means we only create NAIOProvider objects
+ * adding from write-order means we only create FMAIOProvider objects
* without having any pointer to the underlying FMAIIOProvider (if it exists)
*/
static GList *
@@ -427,13 +427,13 @@ io_providers_list_add_from_write_order( const NAPivot *pivot, GList *objects_lis
}
/*
- * add to the list a NAIOProvider object for each loaded plugin which claim
+ * add to the list a FMAIOProvider object for each loaded plugin which claim
* to implement the FMAIIOProvider interface
*/
static GList *
io_providers_list_add_from_plugins( const NAPivot *pivot, GList *objects_list )
{
- static const gchar *thisfn = "na_io_provider_io_providers_list_add_from_plugins";
+ static const gchar *thisfn = "fma_io_provider_io_providers_list_add_from_plugins";
GList *merged;
GList *modules_list, *im;
gchar *id;
@@ -470,7 +470,7 @@ io_providers_list_add_from_plugins( const NAPivot *pivot, GList *objects_list )
}
/*
- * add to the list NAIOProvider objects for the identifiers we may find
+ * add to the list FMAIOProvider objects for the identifiers we may find
* in preferences without having found the plugin itself
*
* preferences come from the io-providers status.
@@ -539,14 +539,14 @@ io_providers_get_from_prefs( void )
}
/*
- * add to the list a NAIOProvider object for the specified module and id
+ * add to the list a FMAIOProvider object for the specified module and id
* if it does not have been already registered
*/
static GList *
io_providers_list_append_object( const NAPivot *pivot, GList *list, FMAIIOProvider *module, const gchar *id )
{
GList *merged;
- NAIOProvider *object;
+ FMAIOProvider *object;
merged = list;
object = peek_provider_by_id( list, id );
@@ -562,15 +562,15 @@ io_providers_list_append_object( const NAPivot *pivot, GList *list, FMAIIOProvid
return( merged );
}
-static NAIOProvider *
+static FMAIOProvider *
peek_provider_by_id( const GList *providers, const gchar *id )
{
- NAIOProvider *provider = NULL;
+ FMAIOProvider *provider = NULL;
const GList *ip;
for( ip = providers ; ip && !provider ; ip = ip->next ){
- if( !strcmp( NA_IO_PROVIDER( ip->data )->private->id, id )){
- provider = NA_IO_PROVIDER( ip->data );
+ if( !strcmp( FMA_IO_PROVIDER( ip->data )->private->id, id )){
+ provider = FMA_IO_PROVIDER( ip->data );
}
}
@@ -578,19 +578,19 @@ peek_provider_by_id( const GList *providers, const gchar *id )
}
/*
- * allocate a new NAIOProvider object for the specified module and id
+ * allocate a new FMAIOProvider object for the specified module and id
*
* id is mandatory here
* module may be NULL
*/
-static NAIOProvider *
+static FMAIOProvider *
io_provider_new( const NAPivot *pivot, FMAIIOProvider *module, const gchar *id )
{
- NAIOProvider *object;
+ FMAIOProvider *object;
g_return_val_if_fail( id && strlen( id ), NULL );
- object = g_object_new( NA_IO_PROVIDER_TYPE, IO_PROVIDER_PROP_ID, id, NULL );
+ object = g_object_new( FMA_IO_PROVIDER_TYPE, IO_PROVIDER_PROP_ID, id, NULL );
if( module ){
io_providers_list_set_module( pivot, object, module );
@@ -600,11 +600,11 @@ io_provider_new( const NAPivot *pivot, FMAIIOProvider *module, const gchar *id )
}
/*
- * when a IIOProvider plugin is associated with the NAIOProvider object,
+ * when a IIOProvider plugin is associated with the FMAIOProvider object,
* we connect the NAPivot callback to the 'item-changed' signal
*/
static void
-io_providers_list_set_module( const NAPivot *pivot, NAIOProvider *provider_object, FMAIIOProvider
*provider_module )
+io_providers_list_set_module( const NAPivot *pivot, FMAIOProvider *provider_object, FMAIIOProvider
*provider_module )
{
provider_object->private->provider = g_object_ref( provider_module );
@@ -616,7 +616,7 @@ io_providers_list_set_module( const NAPivot *pivot, NAIOProvider *provider_objec
provider_object->private->writable =
is_finally_writable( provider_object, pivot, &provider_object->private->reason );
- g_debug( "na_io_provider_list_set_module: provider_module=%p (%s), writable=%s, reason=%d",
+ g_debug( "fma_io_provider_list_set_module: provider_module=%p (%s), writable=%s, reason=%d",
( void * ) provider_module,
provider_object->private->id,
provider_object->private->writable ? "True":"False",
@@ -624,13 +624,13 @@ io_providers_list_set_module( const NAPivot *pivot, NAIOProvider *provider_objec
}
/*
- * na_io_provider_unref_io_providers_list:
+ * fma_io_provider_unref_io_providers_list:
*
* Called by on #NAPivot dispose(), free here resources allocated to
* the I/O providers.
*/
void
-na_io_provider_unref_io_providers_list( void )
+fma_io_provider_unref_io_providers_list( void )
{
g_list_foreach( st_io_providers, ( GFunc ) g_object_unref, NULL );
g_list_free( st_io_providers );
@@ -638,18 +638,18 @@ na_io_provider_unref_io_providers_list( void )
}
/*
- * na_io_provider_get_id:
- * @provider: this #NAIOProvider.
+ * fma_io_provider_get_id:
+ * @provider: this #FMAIOProvider.
*
* Returns: the internal id of this #FMAIIOProvider, as a newly
* allocated string which should be g_free() by the caller.
*/
gchar *
-na_io_provider_get_id( const NAIOProvider *provider )
+fma_io_provider_get_id( const FMAIOProvider *provider )
{
gchar *id;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), NULL );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), NULL );
id = NULL;
@@ -662,8 +662,8 @@ na_io_provider_get_id( const NAIOProvider *provider )
}
/*
- * na_io_provider_get_name:
- * @provider: this #NAIOProvider.
+ * fma_io_provider_get_name:
+ * @provider: this #FMAIOProvider.
*
* Returns: the displayable name of this #FMAIIOProvider, as a newly
* allocated string which should be g_free() by the caller.
@@ -674,17 +674,17 @@ na_io_provider_get_id( const NAIOProvider *provider )
* or an empty string.
*/
gchar *
-na_io_provider_get_name( const NAIOProvider *provider )
+fma_io_provider_get_name( const FMAIOProvider *provider )
{
- static const gchar *thisfn = "na_io_provider_get_name";
+ static const gchar *thisfn = "fma_io_provider_get_name";
gchar *name;
name = g_strdup( "" );
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), name );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), name );
if( !provider->private->dispose_has_run ){
- if( na_io_provider_is_available( provider ) &&
+ if( fma_io_provider_is_available( provider ) &&
FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->get_name ){
g_free( name );
@@ -704,18 +704,18 @@ na_io_provider_get_name( const NAIOProvider *provider )
}
/*
- * na_io_provider_is_available:
- * @provider: the #NAIOProvider object.
+ * fma_io_provider_is_available:
+ * @provider: the #FMAIOProvider object.
*
* Returns: %TRUE if the corresponding #FMAIIOProvider module is available
* at runtime, %FALSE else.
*/
gboolean
-na_io_provider_is_available( const NAIOProvider *provider )
+fma_io_provider_is_available( const FMAIOProvider *provider )
{
gboolean is_available;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), FALSE );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), FALSE );
is_available = FALSE;
@@ -728,8 +728,8 @@ na_io_provider_is_available( const NAIOProvider *provider )
}
/*
- * na_io_provider_is_conf_readable:
- * @provider: this #NAIOProvider.
+ * fma_io_provider_is_conf_readable:
+ * @provider: this #FMAIOProvider.
* @pivot: the #NAPivot application object.
* @mandatory: a pointer to a boolean which will be set to %TRUE if the
* preference is mandatory; may be %NULL.
@@ -744,12 +744,12 @@ na_io_provider_is_available( const NAIOProvider *provider )
* - whether this flag has been set as mandatory by an admin.
*/
gboolean
-na_io_provider_is_conf_readable( const NAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
+fma_io_provider_is_conf_readable( const FMAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
{
gboolean readable;
gchar *group;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), FALSE );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), FALSE );
g_return_val_if_fail( NA_IS_PIVOT( pivot ), FALSE );
readable = FALSE;
@@ -765,8 +765,8 @@ na_io_provider_is_conf_readable( const NAIOProvider *provider, const NAPivot *pi
}
/*
- * na_io_provider_is_conf_writable:
- * @provider: this #NAIOProvider.
+ * fma_io_provider_is_conf_writable:
+ * @provider: this #FMAIOProvider.
* @pivot: the #NAPivot application object.
* @mandatory: a pointer to a boolean which will be set to %TRUE if the
* preference is mandatory; may be %NULL.
@@ -783,11 +783,11 @@ na_io_provider_is_conf_readable( const NAIOProvider *provider, const NAPivot *pi
* FMAIIOProvider module. See also is_willing_to() and is_able_to().
*/
gboolean
-na_io_provider_is_conf_writable( const NAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
+fma_io_provider_is_conf_writable( const FMAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
{
gboolean is_writable;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), FALSE );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), FALSE );
g_return_val_if_fail( NA_IS_PIVOT( pivot ), FALSE );
is_writable = FALSE;
@@ -801,21 +801,21 @@ na_io_provider_is_conf_writable( const NAIOProvider *provider, const NAPivot *pi
}
/**
- * na_io_provider_is_finally_writable:
- * @provider: this #NAIOProvider.
+ * fma_io_provider_is_finally_writable:
+ * @provider: this #FMAIOProvider.
* @reason: if not %NULL, a pointer to a guint which will hold the reason.
*
* Returns: the current writability status of this I/O provider.
*/
gboolean
-na_io_provider_is_finally_writable( const NAIOProvider *provider, guint *reason )
+fma_io_provider_is_finally_writable( const FMAIOProvider *provider, guint *reason )
{
gboolean is_writable;
if( reason ){
*reason = FMA_IIO_PROVIDER_STATUS_UNDETERMINED;
}
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), FALSE );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), FALSE );
is_writable = FALSE;
@@ -831,7 +831,7 @@ na_io_provider_is_finally_writable( const NAIOProvider *provider, guint *reason
}
/*
- * na_io_provider_load_items:
+ * fma_io_provider_load_items:
* @pivot: the #NAPivot object which owns the list of registered I/O
* storage providers.
* @loadable_set: the set of loadable items
@@ -847,9 +847,9 @@ na_io_provider_is_finally_writable( const NAIOProvider *provider, guint *reason
* The returned list should be fma_object_free_items().
*/
GList *
-na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **messages )
+fma_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **messages )
{
- static const gchar *thisfn = "na_io_provider_load_items";
+ static const gchar *thisfn = "fma_io_provider_load_items";
GList *flat, *hierarchy, *filtered;
GSList *level_zero;
guint order_mode;
@@ -918,9 +918,9 @@ na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **me
#if 0
static void
-dump( const NAIOProvider *provider )
+dump( const FMAIOProvider *provider )
{
- static const gchar *thisfn = "na_io_provider_dump";
+ static const gchar *thisfn = "fma_io_provider_dump";
g_debug( "%s: id=%s", thisfn, provider->private->id );
g_debug( "%s: provider=%p", thisfn, ( void * ) provider->private->provider );
@@ -930,19 +930,19 @@ dump( const NAIOProvider *provider )
static void
dump_providers_list( GList *providers )
{
- static const gchar *thisfn = "na_io_provider_dump_providers_list";
+ static const gchar *thisfn = "fma_io_provider_dump_providers_list";
GList *ip;
g_debug( "%s: providers=%p (count=%d)", thisfn, ( void * ) providers, g_list_length( providers ));
for( ip = providers ; ip ; ip = ip->next ){
- dump( NA_IO_PROVIDER( ip->data ));
+ dump( FMA_IO_PROVIDER( ip->data ));
}
}
#endif
static gboolean
-is_conf_writable( const NAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
+is_conf_writable( const FMAIOProvider *provider, const NAPivot *pivot, gboolean *mandatory )
{
gchar *group;
gboolean is_writable;
@@ -959,9 +959,9 @@ is_conf_writable( const NAIOProvider *provider, const NAPivot *pivot, gboolean *
* This same status may later be reevaluated on demand.
*/
static gboolean
-is_finally_writable( const NAIOProvider *provider, const NAPivot *pivot, guint *reason )
+is_finally_writable( const FMAIOProvider *provider, const NAPivot *pivot, guint *reason )
{
- static const gchar *thisfn = "na_io_provider_is_finally_writable";
+ static const gchar *thisfn = "fma_io_provider_is_finally_writable";
gboolean writable;
gboolean is_writable, mandatory;
@@ -1041,7 +1041,7 @@ load_items_filter_unwanted_items( const NAPivot *pivot, GList *hierarchy, guint
static GList *
load_items_filter_unwanted_items_rec( GList *hierarchy, guint loadable_set )
{
- static const gchar *thisfn = "na_io_provider_load_items_filter_unwanted_items_rec";
+ static const gchar *thisfn = "fma_io_provider_load_items_filter_unwanted_items_rec";
GList *subitems, *subitems_f;
GList *it, *itnext;
GList *filtered;
@@ -1106,19 +1106,19 @@ load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **m
const GList *providers;
const GList *ip;
GList *merged, *items, *it;
- const NAIOProvider *provider_object;
+ const FMAIOProvider *provider_object;
const FMAIIOProvider *provider_module;
merged = NULL;
- providers = na_io_provider_get_io_providers_list( pivot );
+ providers = fma_io_provider_get_io_providers_list( pivot );
for( ip = providers ; ip ; ip = ip->next ){
- provider_object = NA_IO_PROVIDER( ip->data );
+ provider_object = FMA_IO_PROVIDER( ip->data );
provider_module = provider_object->private->provider;
if( provider_module &&
FMA_IIO_PROVIDER_GET_INTERFACE( provider_module )->read_items &&
- na_io_provider_is_conf_readable( provider_object, pivot, NULL )){
+ fma_io_provider_is_conf_readable( provider_object, pivot, NULL )){
items = FMA_IIO_PROVIDER_GET_INTERFACE( provider_module )->read_items(
provider_module, messages );
@@ -1143,7 +1143,7 @@ load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **m
static GList *
load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty, FMAObjectItem *parent )
{
- static const gchar *thisfn = "na_io_provider_load_items_hierarchy_build";
+ static const gchar *thisfn = "fma_io_provider_load_items_hierarchy_build";
GList *hierarchy, *it;
GSList *ilevel;
GSList *subitems_ids;
@@ -1229,8 +1229,8 @@ peek_item_by_id_compare( const FMAObject *obj, const gchar *id )
}
/*
- * na_io_provider_write_item:
- * @provider: this #NAIOProvider object.
+ * fma_io_provider_write_item:
+ * @provider: this #FMAIOProvider object.
* @item: a #FMAObjectItem to be written to the storage subsystem.
* @messages: error messages.
*
@@ -1244,9 +1244,9 @@ peek_item_by_id_compare( const FMAObject *obj, const gchar *id )
* storage subsystem.
*/
guint
-na_io_provider_write_item( const NAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
+fma_io_provider_write_item( const FMAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
- static const gchar *thisfn = "na_io_provider_write_item";
+ static const gchar *thisfn = "fma_io_provider_write_item";
guint ret;
g_debug( "%s: provider=%p (%s), item=%p (%s), messages=%p", thisfn,
@@ -1256,7 +1256,7 @@ na_io_provider_write_item( const NAIOProvider *provider, const FMAObjectItem *it
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), ret );
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
g_return_val_if_fail( FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->write_item, ret
);
@@ -1271,8 +1271,8 @@ na_io_provider_write_item( const NAIOProvider *provider, const FMAObjectItem *it
}
/*
- * na_io_provider_delete_item:
- * @provider: this #NAIOProvider object.
+ * fma_io_provider_delete_item:
+ * @provider: this #FMAIOProvider object.
* @item: the #FMAObjectItem item to be deleted.
* @messages: error messages.
*
@@ -1281,9 +1281,9 @@ na_io_provider_write_item( const NAIOProvider *provider, const FMAObjectItem *it
* Returns: the FMAIIOProvider return code.
*/
guint
-na_io_provider_delete_item( const NAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
+fma_io_provider_delete_item( const FMAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
- static const gchar *thisfn = "na_io_provider_delete_item";
+ static const gchar *thisfn = "fma_io_provider_delete_item";
guint ret;
g_debug( "%s: provider=%p (%s), item=%p (%s), messages=%p", thisfn,
@@ -1293,7 +1293,7 @@ na_io_provider_delete_item( const NAIOProvider *provider, const FMAObjectItem *i
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), ret );
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
g_return_val_if_fail( FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->delete_item, ret
);
@@ -1304,8 +1304,8 @@ na_io_provider_delete_item( const NAIOProvider *provider, const FMAObjectItem *i
}
/*
- * na_io_provider_duplicate_data:
- * @provider: this #NAIOProvider object.
+ * fma_io_provider_duplicate_data:
+ * @provider: this #FMAIOProvider object.
* @dest: the target #FMAObjectItem item.
* @source: the source #FMAObjectItem item.
* @messages: error messages.
@@ -1315,9 +1315,9 @@ na_io_provider_delete_item( const NAIOProvider *provider, const FMAObjectItem *i
* Returns: the FMAIIOProvider return code.
*/
guint
-na_io_provider_duplicate_data( const NAIOProvider *provider, FMAObjectItem *dest, const FMAObjectItem
*source, GSList **messages )
+fma_io_provider_duplicate_data( const FMAIOProvider *provider, FMAObjectItem *dest, const FMAObjectItem
*source, GSList **messages )
{
- static const gchar *thisfn = "na_io_provider_duplicate_data";
+ static const gchar *thisfn = "fma_io_provider_duplicate_data";
guint ret;
void *provider_data;
@@ -1329,7 +1329,7 @@ na_io_provider_duplicate_data( const NAIOProvider *provider, FMAObjectItem *dest
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ), ret );
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( dest ), ret );
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( source ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
@@ -1346,14 +1346,14 @@ na_io_provider_duplicate_data( const NAIOProvider *provider, FMAObjectItem *dest
}
/*
- * na_io_provider_get_readonly_tooltip:
+ * fma_io_provider_get_readonly_tooltip:
* @reason: the reason for why an item is not writable.
*
* Returns: the associated tooltip, as a newly allocated string which
* should be g_free() by the caller.
*/
gchar *
-na_io_provider_get_readonly_tooltip( guint reason )
+fma_io_provider_get_readonly_tooltip( guint reason )
{
gchar *tooltip;
@@ -1407,14 +1407,14 @@ na_io_provider_get_readonly_tooltip( guint reason )
}
/*
- * na_io_provider_get_return_code_label:
+ * fma_io_provider_get_return_code_label:
* @code: the return code of an operation.
*
* Returns: the associated label, as a newly allocated string which
* should be g_free() by the caller.
*/
gchar *
-na_io_provider_get_return_code_label( guint code )
+fma_io_provider_get_return_code_label( guint code )
{
gchar *label;
diff --git a/src/core/fma-io-provider.h b/src/core/fma-io-provider.h
new file mode 100644
index 0000000..df5b044
--- /dev/null
+++ b/src/core/fma-io-provider.h
@@ -0,0 +1,121 @@
+/*
+ * FileManager-Actions
+ * A file-manager extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
+ *
+ * FileManager-Actions is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * FileManager-Actions is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FileManager-Actions; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Frederic Ruaudel <grumz grumz net>
+ * Rodrigo Moya <rodrigo gnome-db org>
+ * Pierre Wieser <pwieser trychlos org>
+ * ... and many others (see AUTHORS)
+ */
+
+#ifndef __CORE_FMA_IO_PROVIDER_H__
+#define __CORE_FMA_IO_PROVIDER_H__
+
+/* @title: FMAIOProvider
+ * @short_description: The FMAIOProvider Class Definition
+ * @include: core/fma-io-provider.h
+ *
+ * #FMAIOProvider is the FileManager-Actions class which is used to manage
+ * external I/O Providers which implement #FMAIIOProvider interface. Each
+ * #FMAIOProvider objects may (or not) encapsulates one #FMAIIOProvider
+ * provider.
+ *
+ * Internal FileManager-Actions code should never directly call a
+ * #FMAIIOProvider interface method, but rather should call the
+ * corresponding FMAIOProvider class method.
+ *
+ * Two preferences are used for each i/o provider:
+ * 'readable': means that the i/o provider should be read when building
+ * the items hierarchy
+ * 'writable': means that the i/o provider is candidate when writing a
+ * new item; this also means that existing items are deletable.
+ *
+ * To be actually writable, a i/o provider must:
+ * - be set as 'writable' from a configuration point of view
+ * this may or not be edited depending of this is a mandatory or user
+ * preference
+ * - be willing to write: this is an intrisinc i/o provider attribute
+ * - be able to write: this is a runtime i/o provider property
+ *
+ * and the whole configuration must not have been locked by an admin.
+ */
+
+#include "na-pivot.h"
+
+G_BEGIN_DECLS
+
+#define FMA_IO_PROVIDER_TYPE ( fma_io_provider_get_type())
+#define FMA_IO_PROVIDER( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_IO_PROVIDER_TYPE,
FMAIOProvider ))
+#define FMA_IO_PROVIDER_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_IO_PROVIDER_TYPE,
FMAIOProviderClass ))
+#define FMA_IS_IO_PROVIDER( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_IO_PROVIDER_TYPE ))
+#define FMA_IS_IO_PROVIDER_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_IO_PROVIDER_TYPE ))
+#define FMA_IO_PROVIDER_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_IO_PROVIDER_TYPE,
FMAIOProviderClass ))
+
+typedef struct _FMAIOProviderPrivate FMAIOProviderPrivate;
+
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ FMAIOProviderPrivate *private;
+}
+ FMAIOProvider;
+
+typedef struct _FMAIOProviderClassPrivate FMAIOProviderClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+ FMAIOProviderClassPrivate *private;
+}
+ FMAIOProviderClass;
+
+/* signal sent from a FMAIIOProvider
+ * via the fma_iio_provider_item_changed() function
+ */
+#define IO_PROVIDER_SIGNAL_ITEM_CHANGED "io-provider-item-changed"
+
+GType fma_io_provider_get_type ( void );
+
+FMAIOProvider *fma_io_provider_find_writable_io_provider( const NAPivot *pivot );
+FMAIOProvider *fma_io_provider_find_io_provider_by_id ( const NAPivot *pivot, const gchar *id );
+const GList *fma_io_provider_get_io_providers_list ( const NAPivot *pivot );
+void fma_io_provider_unref_io_providers_list ( void );
+
+gchar *fma_io_provider_get_id ( const FMAIOProvider *provider );
+gchar *fma_io_provider_get_name ( const FMAIOProvider *provider );
+gboolean fma_io_provider_is_available ( const FMAIOProvider *provider );
+gboolean fma_io_provider_is_conf_readable ( const FMAIOProvider *provider, const NAPivot
*pivot, gboolean *mandatory );
+gboolean fma_io_provider_is_conf_writable ( const FMAIOProvider *provider, const NAPivot
*pivot, gboolean *mandatory );
+gboolean fma_io_provider_is_finally_writable ( const FMAIOProvider *provider, guint *reason );
+
+GList *fma_io_provider_load_items ( const NAPivot *pivot, guint loadable_set, GSList
**messages );
+
+guint fma_io_provider_write_item ( const FMAIOProvider *provider, const FMAObjectItem
*item, GSList **messages );
+guint fma_io_provider_delete_item ( const FMAIOProvider *provider, const FMAObjectItem
*item, GSList **messages );
+guint fma_io_provider_duplicate_data ( const FMAIOProvider *provider, FMAObjectItem
*dest, const FMAObjectItem *source, GSList **messages );
+
+gchar *fma_io_provider_get_readonly_tooltip ( guint reason );
+gchar *fma_io_provider_get_return_code_label ( guint code );
+
+G_END_DECLS
+
+#endif /* __CORE_FMA_IO_PROVIDER_H__ */
diff --git a/src/core/fma-object-item-factory.c b/src/core/fma-object-item-factory.c
index e930223..0fce56d 100644
--- a/src/core/fma-object-item-factory.c
+++ b/src/core/fma-object-item-factory.c
@@ -347,7 +347,7 @@ FMADataDef data_def_item [] = {
FALSE,
TRUE,
"I/O provider",
- "A pointer to the NAIOProvider object.",
+ "A pointer to the FMAIOProvider object.",
FMA_DATA_TYPE_POINTER,
NULL,
FALSE,
@@ -374,7 +374,7 @@ FMADataDef data_def_item [] = {
FALSE,
TRUE,
"I/O provider data",
- "A pointer to some NAIOProvider specific data.",
+ "A pointer to some FMAIOProvider specific data.",
FMA_DATA_TYPE_POINTER,
NULL,
FALSE,
diff --git a/src/core/fma-object-item.c b/src/core/fma-object-item.c
index 8d2c737..2e374e0 100644
--- a/src/core/fma-object-item.c
+++ b/src/core/fma-object-item.c
@@ -38,7 +38,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-object-api.h>
-#include "na-io-provider.h"
+#include "fma-io-provider.h"
/* private class data
*/
@@ -247,14 +247,14 @@ object_copy( FMAObject *target, const FMAObject *source, guint mode )
provider = fma_object_get_provider( source );
if( provider ){
- if( !NA_IS_IO_PROVIDER( provider )){
- g_warning( "%s: source=%p (%s), provider=%p is not a NAIOProvider",
+ if( !FMA_IS_IO_PROVIDER( provider )){
+ g_warning( "%s: source=%p (%s), provider=%p is not a FMAIOProvider",
thisfn,
( void * ) source, G_OBJECT_TYPE_NAME( source ),
( void * ) provider );
} else {
- na_io_provider_duplicate_data( NA_IO_PROVIDER( provider ), FMA_OBJECT_ITEM(
target ), FMA_OBJECT_ITEM( source ), NULL );
+ fma_io_provider_duplicate_data( FMA_IO_PROVIDER( provider ), FMA_OBJECT_ITEM(
target ), FMA_OBJECT_ITEM( source ), NULL );
}
}
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index 0ce7e26..f901937 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -36,7 +36,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-timeout.h>
-#include "na-io-provider.h"
+#include "fma-io-provider.h"
#include "na-module.h"
#include "na-pivot.h"
@@ -332,7 +332,7 @@ instance_dispose( GObject *object )
na_settings_free();
/* release the I/O Provider object list */
- na_io_provider_unref_io_providers_list();
+ fma_io_provider_unref_io_providers_list();
/* chain up to the parent class */
if( G_OBJECT_CLASS( st_parent_class )->dispose ){
@@ -570,7 +570,7 @@ na_pivot_load_items( NAPivot *pivot )
messages = NULL;
fma_object_free_items( pivot->private->tree );
- pivot->private->tree = na_io_provider_load_items( pivot, pivot->private->loadable_set,
&messages );
+ pivot->private->tree = fma_io_provider_load_items( pivot, pivot->private->loadable_set,
&messages );
for( im = messages ; im ; im = im->next ){
g_warning( "%s: %s", thisfn, ( const gchar * ) im->data );
diff --git a/src/core/na-pivot.h b/src/core/na-pivot.h
index 122a78d..8858883 100644
--- a/src/core/na-pivot.h
+++ b/src/core/na-pivot.h
@@ -62,7 +62,7 @@
*
* - The emitted signal is catched by na_pivot_on_item_changed_handler(),
* which was connected when the I/O provider plugin was associated with
- * the NAIOProvider object.
+ * the FMAIOProvider object.
*
* - The NAPivot object receives these notifications originating from all
* loaded I/O providers, itself summarizes them, and only then notify its
diff --git a/src/core/na-updater.c b/src/core/na-updater.c
index fefcb81..779fd5a 100644
--- a/src/core/na-updater.c
+++ b/src/core/na-updater.c
@@ -35,7 +35,7 @@
#include <api/fma-gconf-utils.h>
#include <api/fma-object-api.h>
-#include "na-io-provider.h"
+#include "fma-io-provider.h"
#include "na-settings.h"
#include "na-updater.h"
@@ -251,7 +251,7 @@ void
na_updater_check_item_writability_status( const NAUpdater *updater, const FMAObjectItem *item )
{
gboolean writable;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
FMAObjectItem *parent;
guint reason;
@@ -283,12 +283,12 @@ na_updater_check_item_writability_status( const NAUpdater *updater, const FMAObj
if( writable ){
provider = fma_object_get_provider( item );
if( provider ){
- writable = na_io_provider_is_finally_writable( provider, &reason );
+ writable = fma_io_provider_is_finally_writable( provider, &reason );
/* the get_writable_provider() api already takes care of above checks
*/
} else {
- provider = na_io_provider_find_writable_io_provider( NA_PIVOT( updater ));
+ provider = fma_io_provider_find_writable_io_provider( NA_PIVOT( updater ));
if( !provider ){
writable = FALSE;
reason = FMA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND;
@@ -566,15 +566,15 @@ na_updater_write_item( const NAUpdater *updater, FMAObjectItem *item, GSList **m
if( !updater->private->dispose_has_run ){
- NAIOProvider *provider = fma_object_get_provider( item );
+ FMAIOProvider *provider = fma_object_get_provider( item );
if( !provider ){
- provider = na_io_provider_find_writable_io_provider( NA_PIVOT( updater ));
+ provider = fma_io_provider_find_writable_io_provider( NA_PIVOT( updater ));
g_return_val_if_fail( provider, FMA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND );
}
if( provider ){
- ret = na_io_provider_write_item( provider, item, messages );
+ ret = fma_io_provider_write_item( provider, item, messages );
}
}
@@ -599,7 +599,7 @@ guint
na_updater_delete_item( const NAUpdater *updater, const FMAObjectItem *item, GSList **messages )
{
guint ret;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
g_return_val_if_fail( NA_IS_UPDATER( updater ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
@@ -615,8 +615,8 @@ na_updater_delete_item( const NAUpdater *updater, const FMAObjectItem *item, GSL
* without having been ever saved
*/
if( provider ){
- g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ),
FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
- ret = na_io_provider_delete_item( provider, item, messages );
+ g_return_val_if_fail( FMA_IS_IO_PROVIDER( provider ),
FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
+ ret = fma_io_provider_delete_item( provider, item, messages );
}
}
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index bbd23a5..374bb9f 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -38,7 +38,7 @@
#include "api/fma-object-api.h"
#include "core/fma-gtk-utils.h"
-#include "core/na-io-provider.h"
+#include "core/fma-io-provider.h"
#include "nact-application.h"
#include "nact-statusbar.h"
diff --git a/src/nact/nact-iproperties-tab.c b/src/nact/nact-iproperties-tab.c
index 02ef883..e70e839 100644
--- a/src/nact/nact-iproperties-tab.c
+++ b/src/nact/nact-iproperties-tab.c
@@ -38,7 +38,7 @@
#include "api/fma-object-api.h"
#include "core/fma-gtk-utils.h"
-#include "core/na-io-provider.h"
+#include "core/fma-io-provider.h"
#include "base-gtk-utils.h"
#include "nact-iproperties-tab.h"
@@ -493,14 +493,14 @@ display_provider_name( NactIPropertiesTab *instance, FMAObjectItem *item )
{
GtkWidget *label_widget;
gchar *label;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
label_widget = fma_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionItemProvider" );
label = NULL;
if( item ){
provider = fma_object_get_provider( item );
if( provider ){
- label = na_io_provider_get_name( provider );
+ label = fma_io_provider_get_name( provider );
}
}
if( !label ){
diff --git a/src/nact/nact-menu-edit.c b/src/nact/nact-menu-edit.c
index e09d778..a0f2a85 100644
--- a/src/nact/nact-menu-edit.c
+++ b/src/nact/nact-menu-edit.c
@@ -35,7 +35,7 @@
#include "api/fma-core-utils.h"
-#include "core/na-io-provider.h"
+#include "core/fma-io-provider.h"
#include "nact-application.h"
#include "nact-clipboard.h"
@@ -556,7 +556,7 @@ add_ndeletable_msg( const FMAObjectItem *item, gint reason )
gchar *reasstr;
label = fma_object_get_label( item );
- reasstr = na_io_provider_get_readonly_tooltip( reason );
+ reasstr = fma_io_provider_get_readonly_tooltip( reason );
msg = g_strdup_printf( "%s: %s", label, reasstr );
diff --git a/src/nact/nact-menu-file.c b/src/nact/nact-menu-file.c
index 3bb6903..2b6bc6e 100644
--- a/src/nact/nact-menu-file.c
+++ b/src/nact/nact-menu-file.c
@@ -37,7 +37,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-timeout.h>
-#include <core/na-io-provider.h>
+#include <core/fma-io-provider.h>
#include <core/na-iprefs.h>
#include "nact-application.h"
@@ -323,8 +323,8 @@ save_item( NactMainWindow *window, NAUpdater *updater, FMAObjectItem *item, GSLi
{
static const gchar *thisfn = "nact_menu_file_save_item";
gboolean ret;
- NAIOProvider *provider_before;
- NAIOProvider *provider_after;
+ FMAIOProvider *provider_before;
+ FMAIOProvider *provider_after;
GList *subitems, *it;
gchar *label;
guint save_ret;
diff --git a/src/nact/nact-menu.c b/src/nact/nact-menu.c
index 21be110..5bea97e 100644
--- a/src/nact/nact-menu.c
+++ b/src/nact/nact-menu.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include "core/fma-about.h"
-#include "core/na-io-provider.h"
+#include "core/fma-io-provider.h"
#include "nact-main-window.h"
#include "nact-menu.h"
@@ -326,9 +326,9 @@ nact_menu_win( NactMainWindow *main_window )
sdata->updater = nact_application_get_updater( NACT_APPLICATION( application ));
sdata->is_level_zero_writable = na_updater_is_level_zero_writable( sdata->updater );
sdata->has_writable_providers =
- ( na_io_provider_find_writable_io_provider( NA_PIVOT( sdata->updater )) != NULL );
+ ( fma_io_provider_find_writable_io_provider( NA_PIVOT( sdata->updater )) != NULL );
- g_debug( "%s: na_updater_is_level_zero_writable=%s, na_io_provider_find_writable_io_provider=%s",
+ g_debug( "%s: na_updater_is_level_zero_writable=%s, fma_io_provider_find_writable_io_provider=%s",
thisfn,
sdata->is_level_zero_writable ? "True":"False",
sdata->has_writable_providers ? "True":"False" );
diff --git a/src/nact/nact-providers-list.c b/src/nact/nact-providers-list.c
index 74bf341..794974a 100644
--- a/src/nact/nact-providers-list.c
+++ b/src/nact/nact-providers-list.c
@@ -37,7 +37,7 @@
#include <api/fma-gconf-utils.h>
#include <api/fma-object-api.h>
-#include <core/na-io-provider.h>
+#include <core/fma-io-provider.h>
#include "nact-application.h"
#include "base-gtk-utils.h"
@@ -233,20 +233,20 @@ init_view_setup_providers( GtkTreeView *treeview, BaseWindow *window )
gchar *id, *libelle;
gboolean readable, readable_mandatory;
gboolean writable, writable_mandatory;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
model = GTK_LIST_STORE( gtk_tree_view_get_model( treeview ));
application = NACT_APPLICATION( base_window_get_application( window ));
updater = nact_application_get_updater( application );
- providers = na_io_provider_get_io_providers_list( NA_PIVOT( updater ));
+ providers = fma_io_provider_get_io_providers_list( NA_PIVOT( updater ));
for( iter = providers ; iter ; iter = iter->next ){
- provider = NA_IO_PROVIDER( iter->data );
- id = na_io_provider_get_id( provider );
- libelle = na_io_provider_get_name( provider );
- readable = na_io_provider_is_conf_readable( provider, NA_PIVOT( updater ),
&readable_mandatory );
- writable = na_io_provider_is_conf_writable( provider, NA_PIVOT( updater ),
&writable_mandatory );
+ provider = FMA_IO_PROVIDER( iter->data );
+ id = fma_io_provider_get_id( provider );
+ libelle = fma_io_provider_get_name( provider );
+ readable = fma_io_provider_is_conf_readable( provider, NA_PIVOT( updater ),
&readable_mandatory );
+ writable = fma_io_provider_is_conf_writable( provider, NA_PIVOT( updater ),
&writable_mandatory );
g_debug( "%s: id=%s, readable=%s (mandatory=%s), writable=%s (mandatory=%s)",
thisfn, id,
@@ -256,7 +256,7 @@ init_view_setup_providers( GtkTreeView *treeview, BaseWindow *window )
if( !libelle || !g_utf8_strlen( libelle, -1 )){
g_free( libelle );
- if( na_io_provider_is_available( provider )){
+ if( fma_io_provider_is_available( provider )){
/* i18n: default name when the I/O providers doesn't provide one */
libelle = g_strdup_printf( "<%s: %s>", id, _( "no name" ));
@@ -375,7 +375,7 @@ providers_list_save_iter( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter* i
{
gchar *id;
gboolean readable, writable;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
gchar *group;
gtk_tree_model_get( model, iter,
@@ -619,7 +619,7 @@ on_down_clicked( GtkButton *button, BaseWindow *window )
static void
display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter,
ProvidersListData *data )
{
- NAIOProvider *provider;
+ FMAIOProvider *provider;
gchar *name;
gtk_tree_model_get( model, iter, PROVIDER_LIBELLE_COLUMN, &name, PROVIDER_PROVIDER_COLUMN, &provider,
-1 );
@@ -627,7 +627,7 @@ display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *m
g_object_set( cell, "style-set", FALSE, NULL );
g_object_set( cell, "foreground-set", FALSE, NULL );
- if( !na_io_provider_is_available( provider )){
+ if( !fma_io_provider_is_available( provider )){
g_object_set( cell, "style", PANGO_STYLE_ITALIC, "style-set", TRUE, NULL );
g_object_set( cell, "foreground", "grey", "foreground-set", TRUE, NULL );
}
diff --git a/src/nact/nact-statusbar.c b/src/nact/nact-statusbar.c
index a368e66..74085f8 100644
--- a/src/nact/nact-statusbar.c
+++ b/src/nact/nact-statusbar.c
@@ -32,7 +32,7 @@
#endif
#include "core/fma-gtk-utils.h"
-#include "core/na-io-provider.h"
+#include "core/fma-io-provider.h"
#include "base-gtk-utils.h"
#include "nact-statusbar.h"
@@ -312,7 +312,7 @@ nact_statusbar_set_locked( NactStatusbar *bar, gboolean readonly, gint reason )
gtk_image_set_from_file( GTK_IMAGE( priv->image ), LOCKED_IMAGE );
set_pixbuf = FALSE;
g_free( tooltip );
- tooltip = na_io_provider_get_readonly_tooltip( reason );
+ tooltip = fma_io_provider_get_readonly_tooltip( reason );
}
gtk_widget_set_tooltip_text( priv->image, tooltip );
diff --git a/src/utils/nautilus-actions-new.c b/src/utils/nautilus-actions-new.c
index 87fee24..4eec5c1 100644
--- a/src/utils/nautilus-actions-new.c
+++ b/src/utils/nautilus-actions-new.c
@@ -43,7 +43,7 @@
#include <api/fma-object-api.h>
#include <core/fma-gconf-migration.h>
-#include <core/na-io-provider.h>
+#include <core/fma-io-provider.h>
#include <core/fma-exporter.h>
#include <core/na-updater.h>
@@ -578,12 +578,12 @@ static gboolean
output_to_desktop( FMAObjectAction *action, GSList **msgs )
{
NAUpdater *updater;
- NAIOProvider *provider;
+ FMAIOProvider *provider;
guint ret;
gboolean code;
updater = na_updater_new();
- provider = na_io_provider_find_io_provider_by_id( NA_PIVOT( updater ), "na-desktop" );
+ provider = fma_io_provider_find_io_provider_by_id( NA_PIVOT( updater ), "na-desktop" );
if( provider ){
fma_object_set_provider( action, provider );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]