[nautilus-actions/file-manager-actions] NAImporterAsk class is renamed to FMAImporterAsk
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NAImporterAsk class is renamed to FMAImporterAsk
- Date: Mon, 7 Sep 2015 22:10:38 +0000 (UTC)
commit 9e0e87b05133467bfd39ac96611b34c9ab0a74c8
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Sep 7 23:58:19 2015 +0200
NAImporterAsk class is renamed to FMAImporterAsk
src/core/Makefile.am | 10 +-
src/core/{na-importer-ask.c => fma-importer-ask.c} | 130 ++++++++++----------
src/core/{na-importer-ask.h => fma-importer-ask.h} | 54 ++++----
.../{na-importer-ask.ui => fma-importer-ask.ui} | 0
src/core/{na-importer.c => fma-importer.c} | 80 ++++++------
src/core/{na-importer.h => fma-importer.h} | 52 ++++----
src/core/na-iprefs.c | 2 +-
src/nact/nact-assistant-import.c | 26 ++--
src/nact/nact-preferences-editor.c | 8 +-
src/nact/nact-tree-model-dnd.c | 14 +-
src/test/test-reader.c | 8 +-
11 files changed, 192 insertions(+), 192 deletions(-)
---
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 9b4b06f..546eaab 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -86,10 +86,10 @@ libna_core_la_SOURCES = \
fma-iio-provider.c \
na-import-mode.c \
na-import-mode.h \
- na-importer.c \
- na-importer.h \
- na-importer-ask.c \
- na-importer-ask.h \
+ fma-importer.c \
+ fma-importer.h \
+ fma-importer-ask.c \
+ fma-importer-ask.h \
na-io-provider.c \
na-io-provider.h \
na-ioption.c \
@@ -136,7 +136,7 @@ libna_core_la_LDFLAGS = \
$(NULL)
ui_data_DATA = \
- na-importer-ask.ui \
+ fma-importer-ask.ui \
$(NULL)
exportformat_data_DATA = \
diff --git a/src/core/na-importer-ask.c b/src/core/fma-importer-ask.c
similarity index 77%
rename from src/core/na-importer-ask.c
rename to src/core/fma-importer-ask.c
index b74176d..a69e1a2 100644
--- a/src/core/na-importer-ask.c
+++ b/src/core/fma-importer-ask.c
@@ -38,49 +38,49 @@
#include "fma-gtk-utils.h"
#include "na-import-mode.h"
-#include "na-importer.h"
-#include "na-importer-ask.h"
+#include "fma-importer.h"
+#include "fma-importer-ask.h"
#include "na-ioptions-list.h"
#include "na-settings.h"
/* private class data
*/
-struct _NAImporterAskClassPrivate {
+struct _FMAImporterAskClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAImporterAskPrivate {
+struct _FMAImporterAskPrivate {
gboolean dispose_has_run;
GtkWindow *toplevel;
FMAObjectItem *importing;
FMAObjectItem *existing;
- NAImporterAskUserParms *parms;
+ FMAImporterAskUserParms *parms;
guint mode;
};
static GObjectClass *st_parent_class = NULL;
-static NAImporterAsk *st_dialog = NULL;
-static const gchar *st_uixml = PKGUIDIR "/na-importer-ask.ui";
+static FMAImporterAsk *st_dialog = NULL;
+static const gchar *st_uixml = PKGUIDIR "/fma-importer-ask.ui";
static GType register_type( void );
-static void class_init( NAImporterAskClass *klass );
+static void class_init( FMAImporterAskClass *klass );
static void ioptions_list_iface_init( NAIOptionsListInterface *iface, void *user_data );
static GList *ioptions_list_get_modes( const NAIOptionsList *instance, GtkWidget *container );
static void ioptions_list_free_modes( const NAIOptionsList *instance, GtkWidget *container, GList
*modes );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *dialog );
static void instance_finalize( GObject *dialog );
-static NAImporterAsk *import_ask_new( GtkWindow *parent );
-static void initialize_gtk( NAImporterAsk *dialog, GtkWindow *toplevel );
-static void initialize_window( NAImporterAsk *dialog, GtkWindow *toplevel );
-static void get_selected_mode( NAImporterAsk *editor );
-static void on_destroy_toplevel( GtkWindow *toplevel, NAImporterAsk *dialog );
-static gboolean on_dialog_response( NAImporterAsk *editor, gint code );
+static FMAImporterAsk *import_ask_new( GtkWindow *parent );
+static void initialize_gtk( FMAImporterAsk *dialog, GtkWindow *toplevel );
+static void initialize_window( FMAImporterAsk *dialog, GtkWindow *toplevel );
+static void get_selected_mode( FMAImporterAsk *editor );
+static void on_destroy_toplevel( GtkWindow *toplevel, FMAImporterAsk *dialog );
+static gboolean on_dialog_response( FMAImporterAsk *editor, gint code );
GType
-na_importer_ask_get_type( void )
+fma_importer_ask_get_type( void )
{
static GType dialog_type = 0;
@@ -94,17 +94,17 @@ na_importer_ask_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_importer_ask_register_type";
+ static const gchar *thisfn = "fma_importer_ask_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAImporterAskClass ),
+ sizeof( FMAImporterAskClass ),
( GBaseInitFunc ) NULL,
( GBaseFinalizeFunc ) NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAImporterAsk ),
+ sizeof( FMAImporterAsk ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -117,7 +117,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "NAImporterAsk", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMAImporterAsk", &info, 0 );
g_type_add_interface_static( type, NA_TYPE_IOPTIONS_LIST, &ioptions_list_iface_info );
@@ -125,9 +125,9 @@ register_type( void )
}
static void
-class_init( NAImporterAskClass *klass )
+class_init( FMAImporterAskClass *klass )
{
- static const gchar *thisfn = "na_importer_ask_class_init";
+ static const gchar *thisfn = "fma_importer_ask_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -138,7 +138,7 @@ class_init( NAImporterAskClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- klass->private = g_new0( NAImporterAskClassPrivate, 1 );
+ klass->private = g_new0( FMAImporterAskClassPrivate, 1 );
}
static void
@@ -157,9 +157,9 @@ ioptions_list_get_modes( const NAIOptionsList *instance, GtkWidget *container )
{
GList *modes;
- g_return_val_if_fail( NA_IS_IMPORTER_ASK( instance ), NULL );
+ g_return_val_if_fail( FMA_IS_IMPORTER_ASK( instance ), NULL );
- modes = na_importer_get_modes();
+ modes = fma_importer_get_modes();
return( modes );
}
@@ -167,25 +167,25 @@ ioptions_list_get_modes( const NAIOptionsList *instance, GtkWidget *container )
static void
ioptions_list_free_modes( const NAIOptionsList *instance, GtkWidget *container, GList *modes )
{
- g_return_if_fail( NA_IS_IMPORTER_ASK( instance ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( instance ));
- na_importer_free_modes( modes );
+ fma_importer_free_modes( modes );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "na_importer_ask_instance_init";
- NAImporterAsk *self;
+ static const gchar *thisfn = "fma_importer_ask_instance_init";
+ FMAImporterAsk *self;
- g_return_if_fail( NA_IS_IMPORTER_ASK( instance ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = NA_IMPORTER_ASK( instance );
+ self = FMA_IMPORTER_ASK( instance );
- self->private = g_new0( NAImporterAskPrivate, 1 );
+ self->private = g_new0( FMAImporterAskPrivate, 1 );
self->private->dispose_has_run = FALSE;
}
@@ -193,12 +193,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *dialog )
{
- static const gchar *thisfn = "na_importer_ask_instance_dispose";
- NAImporterAsk *self;
+ static const gchar *thisfn = "fma_importer_ask_instance_dispose";
+ FMAImporterAsk *self;
- g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( dialog ));
- self = NA_IMPORTER_ASK( dialog );
+ self = FMA_IMPORTER_ASK( dialog );
if( !self->private->dispose_has_run ){
@@ -216,14 +216,14 @@ instance_dispose( GObject *dialog )
static void
instance_finalize( GObject *dialog )
{
- static const gchar *thisfn = "na_importer_ask_instance_finalize";
- NAImporterAsk *self;
+ static const gchar *thisfn = "fma_importer_ask_instance_finalize";
+ FMAImporterAsk *self;
- g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( dialog ));
g_debug( "%s: dialog=%p", thisfn, ( void * ) dialog );
- self = NA_IMPORTER_ASK( dialog );
+ self = FMA_IMPORTER_ASK( dialog );
if( self->private->toplevel ){
gtk_widget_destroy( GTK_WIDGET( self->private->toplevel ));
@@ -238,12 +238,12 @@ instance_finalize( GObject *dialog )
}
/*
- * Returns a newly allocated NAImporterAsk object.
+ * Returns a newly allocated FMAImporterAsk object.
*/
-static NAImporterAsk *
+static FMAImporterAsk *
import_ask_new( GtkWindow *parent )
{
- NAImporterAsk *dialog;
+ FMAImporterAsk *dialog;
GtkBuilder *builder;
GError *error;
GtkWindow *toplevel;
@@ -252,7 +252,7 @@ import_ask_new( GtkWindow *parent )
dialog = st_dialog;
} else {
- dialog = g_object_new( NA_TYPE_IMPORTER_ASK, NULL );
+ dialog = g_object_new( FMA_TYPE_IMPORTER_ASK, NULL );
builder = gtk_builder_new();
error = NULL;
@@ -299,7 +299,7 @@ import_ask_new( GtkWindow *parent )
}
/*
- * na_importer_ask_user:
+ * fma_importer_ask_user:
* @importing: the #FMAObjectItem-derived object being currently imported.
* @existing: the #FMAObjectItem-derived already existing object with the same ID.
* @parms: a #FMAIImporterUriParms structure.
@@ -307,13 +307,13 @@ import_ask_new( GtkWindow *parent )
* Ask the user for what to do when an imported item has the same ID
* that an already existing one.
*
- * If a parent is specified, then we allocate a new NAImporterAsk from
+ * If a parent is specified, then we allocate a new FMAImporterAsk from
* GtkBuilder, hiding and showing it for each invocation of the dialog
* by the parent, as long as the parent exists.
- * When the parent is destroyed, this (maybe hidden) NAImporterAsk dialog
+ * When the parent is destroyed, this (maybe hidden) FMAImporterAsk dialog
* is also destroyed.
*
- * If there is no specified parent, then we recreate a new NAImporterAsk
+ * If there is no specified parent, then we recreate a new FMAImporterAsk
* dialog at each invocation, destroying it after on_dialog_response()
* returns.
*
@@ -323,10 +323,10 @@ import_ask_new( GtkWindow *parent )
* becomes his preference import mode.
*/
guint
-na_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *existing, NAImporterAskUserParms
*parms )
+fma_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *existing,
FMAImporterAskUserParms *parms )
{
- static const gchar *thisfn = "na_importer_ask_user";
- NAImporterAsk *dialog;
+ static const gchar *thisfn = "fma_importer_ask_user";
+ FMAImporterAsk *dialog;
guint mode;
gint code;
@@ -365,12 +365,12 @@ na_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *exist
return( mode );
}
static void
-initialize_gtk( NAImporterAsk *dialog, GtkWindow *toplevel )
+initialize_gtk( FMAImporterAsk *dialog, GtkWindow *toplevel )
{
- static const gchar *thisfn = "na_importer_ask_initialize_gtk";
+ static const gchar *thisfn = "fma_importer_ask_initialize_gtk";
GtkWidget *container;
- g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( dialog ));
g_debug( "%s: dialog=%p, toplevel=%p", thisfn, ( void * ) dialog, ( void * ) toplevel );
@@ -379,16 +379,16 @@ initialize_gtk( NAImporterAsk *dialog, GtkWindow *toplevel )
}
static void
-initialize_window( NAImporterAsk *editor, GtkWindow *toplevel )
+initialize_window( FMAImporterAsk *editor, GtkWindow *toplevel )
{
- static const gchar *thisfn = "na_importer_ask_initialize_window";
+ static const gchar *thisfn = "fma_importer_ask_initialize_window";
gchar *imported_label, *existing_label;
gchar *label;
GtkWidget *widget;
GtkWidget *button;
gchar *mode_id;
- g_return_if_fail( NA_IS_IMPORTER_ASK( editor ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( editor ));
g_debug( "%s: editor=%p, toplevel=%p", thisfn, ( void * ) editor, ( void * ) toplevel );
@@ -425,7 +425,7 @@ initialize_window( NAImporterAsk *editor, GtkWindow *toplevel )
}
static void
-get_selected_mode( NAImporterAsk *editor )
+get_selected_mode( FMAImporterAsk *editor )
{
GtkWidget *widget;
NAIOption *mode;
@@ -448,19 +448,19 @@ get_selected_mode( NAImporterAsk *editor )
}
/*
- * destroy signal is only connected if the NAImporterAsk has been created
+ * destroy signal is only connected if the FMAImporterAsk has been created
* with a parent window; it has been defined with 'destroy_with_parent'
- * and so we have yet to unref the NAImporterAsk object itself
+ * and so we have yet to unref the FMAImporterAsk object itself
*/
static void
-on_destroy_toplevel( GtkWindow *toplevel, NAImporterAsk *dialog )
+on_destroy_toplevel( GtkWindow *toplevel, FMAImporterAsk *dialog )
{
- static const gchar *thisfn = "na_importer_ask_on_destroy_toplevel";
+ static const gchar *thisfn = "fma_importer_ask_on_destroy_toplevel";
g_debug( "%s: toplevel=%p, dialog=%p",
thisfn, ( void * ) toplevel, ( void * ) dialog );
- g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+ g_return_if_fail( FMA_IS_IMPORTER_ASK( dialog ));
g_return_if_fail( toplevel == dialog->private->toplevel );
if( !dialog->private->dispose_has_run ){
@@ -473,11 +473,11 @@ on_destroy_toplevel( GtkWindow *toplevel, NAImporterAsk *dialog )
}
static gboolean
-on_dialog_response( NAImporterAsk *editor, gint code )
+on_dialog_response( FMAImporterAsk *editor, gint code )
{
- static const gchar *thisfn = "na_importer_ask_on_dialog_response";
+ static const gchar *thisfn = "fma_importer_ask_on_dialog_response";
- g_return_val_if_fail( NA_IS_IMPORTER_ASK( editor ), FALSE );
+ g_return_val_if_fail( FMA_IS_IMPORTER_ASK( editor ), FALSE );
g_debug( "%s: editor=%p, code=%d", thisfn, ( void * ) editor, code );
diff --git a/src/core/na-importer-ask.h b/src/core/fma-importer-ask.h
similarity index 50%
rename from src/core/na-importer-ask.h
rename to src/core/fma-importer-ask.h
index d4ce002..7ef75af 100644
--- a/src/core/na-importer-ask.h
+++ b/src/core/fma-importer-ask.h
@@ -27,12 +27,12 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __CORE_NA_IMPORTER_ASK_H__
-#define __CORE_NA_IMPORTER_ASK_H__
+#ifndef __CORE_FMA_IMPORTER_ASK_H__
+#define __CORE_FMA_IMPORTER_ASK_H__
-/* @title: NAImporterAsk
- * @short_description: The #NAImporterAsk Class Definition
- * @include: core/na-importer-ask.h
+/* @title: FMAImporterAsk
+ * @short_description: The #FMAImporterAsk Class Definition
+ * @include: core/fma-importer-ask.h
*
* This class creates and manages a dialog. It is ran each time an
* imported action has the same Id as an existing one, and the user
@@ -47,44 +47,44 @@
G_BEGIN_DECLS
-#define NA_TYPE_IMPORTER_ASK ( na_importer_ask_get_type())
-#define NA_IMPORTER_ASK( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_TYPE_IMPORTER_ASK,
NAImporterAsk ))
-#define NA_IMPORTER_ASK_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NA_TYPE_IMPORTER_ASK,
NAImporterAskClass ))
-#define NA_IS_IMPORTER_ASK( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_TYPE_IMPORTER_ASK ))
-#define NA_IS_IMPORTER_ASK_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NA_TYPE_IMPORTER_ASK ))
-#define NA_IMPORTER_ASK_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NA_TYPE_IMPORTER_ASK,
NAImporterAskClass ))
+#define FMA_TYPE_IMPORTER_ASK ( fma_importer_ask_get_type())
+#define FMA_IMPORTER_ASK( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_IMPORTER_ASK,
FMAImporterAsk ))
+#define FMA_IMPORTER_ASK_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_IMPORTER_ASK,
FMAImporterAskClass ))
+#define FMA_IS_IMPORTER_ASK( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_IMPORTER_ASK ))
+#define FMA_IS_IMPORTER_ASK_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_IMPORTER_ASK ))
+#define FMA_IMPORTER_ASK_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_IMPORTER_ASK,
FMAImporterAskClass ))
-typedef struct _NAImporterAskPrivate NAImporterAskPrivate;
+typedef struct _FMAImporterAskPrivate FMAImporterAskPrivate;
typedef struct {
/*< private >*/
- GObject parent;
- NAImporterAskPrivate *private;
+ GObject parent;
+ FMAImporterAskPrivate *private;
}
- NAImporterAsk;
+ FMAImporterAsk;
-typedef struct _NAImporterAskClassPrivate NAImporterAskClassPrivate;
+typedef struct _FMAImporterAskClassPrivate FMAImporterAskClassPrivate;
typedef struct {
/*< private >*/
- GObjectClass parent;
- NAImporterAskClassPrivate *private;
+ GObjectClass parent;
+ FMAImporterAskClassPrivate *private;
}
- NAImporterAskClass;
+ FMAImporterAskClass;
typedef struct {
- GtkWindow *parent;
- gchar *uri;
- guint count;
- gboolean keep_choice;
+ GtkWindow *parent;
+ gchar *uri;
+ guint count;
+ gboolean keep_choice;
const NAPivot *pivot;
}
- NAImporterAskUserParms;
+ FMAImporterAskUserParms;
-GType na_importer_ask_get_type( void );
+GType fma_importer_ask_get_type( void );
-guint na_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *existing,
NAImporterAskUserParms *parms );
+guint fma_importer_ask_user ( const FMAObjectItem *importing, const FMAObjectItem *existing,
FMAImporterAskUserParms *parms );
G_END_DECLS
-#endif /* __CORE_NA_IMPORTER_ASK_H__ */
+#endif /* __CORE_FMA_IMPORTER_ASK_H__ */
diff --git a/src/core/na-importer-ask.ui b/src/core/fma-importer-ask.ui
similarity index 100%
rename from src/core/na-importer-ask.ui
rename to src/core/fma-importer-ask.ui
diff --git a/src/core/na-importer.c b/src/core/fma-importer.c
similarity index 85%
rename from src/core/na-importer.c
rename to src/core/fma-importer.c
index 17f5d22..59a9386 100644
--- a/src/core/na-importer.c
+++ b/src/core/fma-importer.c
@@ -39,8 +39,8 @@
#include <api/fma-object-api.h>
#include "na-import-mode.h"
-#include "na-importer.h"
-#include "na-importer-ask.h"
+#include "fma-importer.h"
+#include "fma-importer-ask.h"
typedef struct {
guint id; /* the import mode used in switch statement in the
code */
@@ -89,11 +89,11 @@ static NAImportModeStr st_import_ask_mode = {
"import-mode-ask.png"
};
-static NAImporterResult *import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri );
-static void manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserParms
*ask_parms, NAImporterResult *result );
-static FMAObjectItem *is_importing_already_exists( NAImporterParms *parms, GList *results,
NAImporterResult *result );
+static FMAImporterResult *import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri );
+static void manage_import_mode( FMAImporterParms *parms, GList *results,
FMAImporterAskUserParms *ask_parms, FMAImporterResult *result );
+static FMAObjectItem *is_importing_already_exists( FMAImporterParms *parms, GList *results,
FMAImporterResult *result );
static void renumber_label_item( FMAObjectItem *item );
-static guint ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing,
NAImporterAskUserParms *parms );
+static guint ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing,
FMAImporterAskUserParms *parms );
static guint get_id_from_string( const gchar *str );
static NAIOption *get_mode_from_struct( const NAImportModeStr *str );
@@ -101,9 +101,9 @@ static NAIOption *get_mode_from_struct( const NAImportModeStr *str );
#define ERR_NOT_LOADABLE _( "%s is not loadable (empty or too big or not a regular file)" )
/*
- * na_importer_import_from_uris:
+ * fma_importer_import_from_uris:
* @pivot: the #NAPivot pivot for this application.
- * @parms: a #NAImporterParms structure.
+ * @parms: a #FMAImporterParms structure.
*
* Imports a list of URIs.
*
@@ -114,26 +114,26 @@ static NAIOption *get_mode_from_struct( const NAImportModeStr *str );
* #parms.uris contains a list of URIs to import.
*
* Each import operation will have its corresponding newly allocated
- * #NAImporterResult structure which will contain:
+ * #FMAImporterResult structure which will contain:
* - the imported URI
* - the #FMAIImporter provider if one has been found, or %NULL
* - a #FMAObjectItem item if import was successful, or %NULL
* - a list of error messages, or %NULL.
*
- * Returns: a #GList of #NAImporterResult structures
+ * Returns: a #GList of #FMAImporterResult structures
* (was the last import operation code up to 3.2).
*
* Since: 2.30
*/
GList *
-na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms )
+fma_importer_import_from_uris( const NAPivot *pivot, FMAImporterParms *parms )
{
- static const gchar *thisfn = "na_importer_import_from_uris";
+ static const gchar *thisfn = "fma_importer_import_from_uris";
GList *results, *ires;
GList *modules;
GSList *uri;
- NAImporterResult *import_result;
- NAImporterAskUserParms ask_parms;
+ FMAImporterResult *import_result;
+ FMAImporterAskUserParms ask_parms;
gchar *mode_str;
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
@@ -156,7 +156,7 @@ na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms )
results = g_list_reverse( results );
- memset( &ask_parms, '\0', sizeof( NAImporterAskUserParms ));
+ memset( &ask_parms, '\0', sizeof( FMAImporterAskUserParms ));
ask_parms.parent = parms->parent_toplevel;
ask_parms.count = 0;
ask_parms.keep_choice = FALSE;
@@ -173,7 +173,7 @@ na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms )
/* second phase: check for their pre-existence
*/
for( ires = results ; ires ; ires = ires->next ){
- import_result = ( NAImporterResult * ) ires->data;
+ import_result = ( FMAImporterResult * ) ires->data;
if( import_result->imported ){
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( import_result->imported ), NULL );
@@ -188,13 +188,13 @@ na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms )
}
/*
- * na_importer_free_result:
- * @result: the #NAImporterResult structure to be released.
+ * fma_importer_free_result:
+ * @result: the #FMAImporterResult structure to be released.
*
* Release the structure.
*/
void
-na_importer_free_result( NAImporterResult *result )
+fma_importer_free_result( FMAImporterResult *result )
{
g_free( result->uri );
fma_core_utils_slist_free( result->messages );
@@ -212,10 +212,10 @@ na_importer_free_result( NAImporterResult *result )
* only keep the messages provided by the interface which has successfully
* imported the item.
*/
-static NAImporterResult *
+static FMAImporterResult *
import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri )
{
- NAImporterResult *result;
+ FMAImporterResult *result;
FMAIImporterImportFromUriParmsv2 provider_parms;
GList *im;
guint code;
@@ -256,7 +256,7 @@ import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri )
}
}
- result = g_new0( NAImporterResult, 1 );
+ result = g_new0( FMAImporterResult, 1 );
result->uri = g_strdup( uri );
result->imported = provider_parms.imported;
result->importer = provider;
@@ -270,9 +270,9 @@ import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri )
* ask for the user if needed
*/
static void
-manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserParms *ask_parms,
NAImporterResult *result )
+manage_import_mode( FMAImporterParms *parms, GList *results, FMAImporterAskUserParms *ask_parms,
FMAImporterResult *result )
{
- static const gchar *thisfn = "na_importer_manage_import_mode";
+ static const gchar *thisfn = "fma_importer_manage_import_mode";
FMAObjectItem *exists;
guint mode;
gchar *id;
@@ -361,9 +361,9 @@ manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserPar
* then delegates to the caller-provided check function the rest of work...
*/
static FMAObjectItem *
-is_importing_already_exists( NAImporterParms *parms, GList *results, NAImporterResult *result )
+is_importing_already_exists( FMAImporterParms *parms, GList *results, FMAImporterResult *result )
{
- static const gchar *thisfn = "na_importer_is_importing_already_exists";
+ static const gchar *thisfn = "fma_importer_is_importing_already_exists";
FMAObjectItem *exists;
GList *ip;
@@ -376,7 +376,7 @@ is_importing_already_exists( NAImporterParms *parms, GList *results, NAImporterR
* (only tries previous items of the list)
*/
for( ip = results ; ip && !exists && ip->data != result ; ip = ip->next ){
- NAImporterResult *try_result = ( NAImporterResult * ) ip->data;
+ FMAImporterResult *try_result = ( FMAImporterResult * ) ip->data;
if( try_result->imported ){
g_return_val_if_fail( FMA_IS_OBJECT_ITEM( try_result->imported ), NULL );
@@ -423,13 +423,13 @@ renumber_label_item( FMAObjectItem *item )
}
static guint
-ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing, NAImporterAskUserParms
*parms )
+ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing, FMAImporterAskUserParms
*parms )
{
guint mode;
gchar *mode_str;
if( parms->count == 0 || !parms->keep_choice ){
- mode = na_importer_ask_user( importing, existing, parms );
+ mode = fma_importer_ask_user( importing, existing, parms );
} else {
mode_str = na_settings_get_string( NA_IPREFS_IMPORT_ASK_USER_LAST_MODE, NULL, NULL );
@@ -463,15 +463,15 @@ get_id_from_string( const gchar *str )
}
/*
- * na_importer_get_modes:
+ * fma_importer_get_modes:
*
* Returns: the list of available import modes.
- * This list should later be released by calling na_importer_free_modes();
+ * This list should later be released by calling fma_importer_free_modes();
*/
GList *
-na_importer_get_modes( void )
+fma_importer_get_modes( void )
{
- static const gchar *thisfn = "na_importer_get_modes";
+ static const gchar *thisfn = "fma_importer_get_modes";
GList *modes;
NAIOption *mode;
guint i;
@@ -519,15 +519,15 @@ get_mode_from_struct( const NAImportModeStr *str )
}
/*
- * na_importer_free_modes:
- * @modes: a #GList of #NAImportMode items, as returned by na_importer_get_modes().
+ * fma_importer_free_modes:
+ * @modes: a #GList of #NAImportMode items, as returned by fma_importer_get_modes().
*
* Releases the resources allocated to the @modes list.
*/
void
-na_importer_free_modes( GList *modes )
+fma_importer_free_modes( GList *modes )
{
- static const gchar *thisfn = "na_importer_free_modes";
+ static const gchar *thisfn = "fma_importer_free_modes";
g_debug( "%s: modes=%p", thisfn, ( void * ) modes );
@@ -536,14 +536,14 @@ na_importer_free_modes( GList *modes )
}
/*
- * na_importer_get_ask_mode:
+ * fma_importer_get_ask_mode:
*
* Returns: a #NAImportMode object which describes the 'Ask me' option.
*/
NAIOption *
-na_importer_get_ask_mode( void )
+fma_importer_get_ask_mode( void )
{
- static const gchar *thisfn = "na_importer_get_ask_mode";
+ static const gchar *thisfn = "fma_importer_get_ask_mode";
g_debug( "%s", thisfn );
diff --git a/src/core/na-importer.h b/src/core/fma-importer.h
similarity index 74%
rename from src/core/na-importer.h
rename to src/core/fma-importer.h
index c1aff76..05aad2a 100644
--- a/src/core/na-importer.h
+++ b/src/core/fma-importer.h
@@ -27,16 +27,16 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __CORE_NA_IMPORTER_H__
-#define __CORE_NA_IMPORTER_H__
+#ifndef __CORE_FMA_IMPORTER_H__
+#define __CORE_FMA_IMPORTER_H__
/* @title: FMAIImporter
* @short_description: The #FMAIImporter Internal Functions
- * @include: core/na-importer.h
+ * @include: core/fma-importer.h
*
* Internal FileManager-Actions code should never directly call a
* #FMAIImporter interface method, but rather should call the
- * corresponding na_importer_xxx() functions.
+ * corresponding fma_importer_xxx() functions.
*
* Importing items is a three-phase operation:
*
@@ -67,7 +67,7 @@ G_BEGIN_DECLS
#ifndef NA_ENABLE_DEPRECATED
/*
- * NAImporterImportMode:
+ * FMAImporterImportMode:
* @IMPORTER_MODE_NO_IMPORT: a "do not import" mode.
* @IMPORTER_MODE_RENUMBER: reallocate a new id when the imported one already exists.
* @IMPORTER_MODE_OVERRIDE: override the existing id with the imported one.
@@ -79,7 +79,7 @@ G_BEGIN_DECLS
*
* This same enum used to be defined as FMAIImporterImportMode in api/fma-iimporter.h
* header. The enum has been deprecated there in N-A 3.2 when the FMAIImporter v2
- * interface was defined. It has so been moved here with the NAImporterImportMode
+ * interface was defined. It has so been moved here with the FMAImporterImportMode
* name.
*/
typedef enum {
@@ -88,11 +88,11 @@ typedef enum {
IMPORTER_MODE_OVERRIDE,
IMPORTER_MODE_ASK
}
- NAImporterImportMode;
+ FMAImporterImportMode;
#endif
/*
- * NAImporterCheckFn:
+ * FMAImporterCheckFn:
* @imported: the currently imported #FMAObjectItem -derived object.
* @fn_data: some data to be passed to the function.
*
@@ -114,42 +114,42 @@ typedef enum {
*
* Since: 3.2
*/
-typedef FMAObjectItem * ( *NAImporterCheckFn )( const FMAObjectItem *, void * );
+typedef FMAObjectItem * ( *FMAImporterCheckFn )( const FMAObjectItem *, void * );
typedef struct {
- GSList *uris; /* the list of uris to import */
- NAImporterCheckFn check_fn; /* the check_for_duplicate function */
- void *check_fn_data; /* data to be passed to the check_fn function */
- guint preferred_mode; /* preferred import mode, defaults to
NA_IPREFS_IMPORT_PREFERRED_MODE */
- GtkWindow *parent_toplevel; /* parent toplevel */
+ GSList *uris; /* the list of uris to import */
+ FMAImporterCheckFn check_fn; /* the check_for_duplicate function */
+ void *check_fn_data; /* data to be passed to the check_fn function */
+ guint preferred_mode; /* preferred import mode, defaults to
NA_IPREFS_IMPORT_PREFERRED_MODE */
+ GtkWindow *parent_toplevel; /* parent toplevel */
}
- NAImporterParms;
+ FMAImporterParms;
typedef struct {
/* phase 1: import into memory from i/o provider
*/
- gchar *uri; /* the imported uri */
+ gchar *uri; /* the imported uri */
FMAObjectItem *imported; /* the imported FMAObjectItem-derived object,
or %NULL */
FMAIImporter *importer; /* the importer module, or %NULL */
/* phase 2: check for pre-existence
*/
- gboolean exist; /* whether the imported Id already existed */
- guint mode; /* the actual mode in effect for this import
*/
- GSList *messages; /* a #GSList list of localized strings */
+ gboolean exist; /* whether the imported Id already existed */
+ guint mode; /* the actual mode in effect for this import
*/
+ GSList *messages; /* a #GSList list of localized strings */
}
- NAImporterResult;
+ FMAImporterResult;
-GList *na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms );
+GList *fma_importer_import_from_uris( const NAPivot *pivot, FMAImporterParms *parms );
-void na_importer_free_result ( NAImporterResult *result );
+void fma_importer_free_result ( FMAImporterResult *result );
-GList *na_importer_get_modes ( void );
-void na_importer_free_modes ( GList *modes );
+GList *fma_importer_get_modes ( void );
+void fma_importer_free_modes ( GList *modes );
-NAIOption *na_importer_get_ask_mode ( void );
+NAIOption *fma_importer_get_ask_mode ( void );
G_END_DECLS
-#endif /* __CORE_NA_IMPORTER_H__ */
+#endif /* __CORE_FMA_IMPORTER_H__ */
diff --git a/src/core/na-iprefs.c b/src/core/na-iprefs.c
index 8ade89b..72836ee 100644
--- a/src/core/na-iprefs.c
+++ b/src/core/na-iprefs.c
@@ -35,7 +35,7 @@
#include <api/fma-core-utils.h>
-#include "na-importer.h"
+#include "fma-importer.h"
#include "na-iprefs.h"
#include "na-settings.h"
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index c7a5087..9ef626b 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -39,7 +39,7 @@
#include <api/fma-core-utils.h>
#include <core/na-import-mode.h>
-#include <core/na-importer.h>
+#include <core/fma-importer.h>
#include <core/na-ioptions-list.h>
#include <core/fma-gtk-utils.h>
#include <core/na-settings.h>
@@ -209,7 +209,7 @@ ioptions_list_get_modes( const NAIOptionsList *instance, GtkWidget *container )
g_return_val_if_fail( NACT_IS_ASSISTANT_IMPORT( instance ), NULL );
- modes = na_importer_get_modes();
+ modes = fma_importer_get_modes();
return( modes );
}
@@ -217,13 +217,13 @@ ioptions_list_get_modes( const NAIOptionsList *instance, GtkWidget *container )
static void
ioptions_list_free_modes( const NAIOptionsList *instance, GtkWidget *container, GList *modes )
{
- na_importer_free_modes( modes );
+ fma_importer_free_modes( modes );
}
static NAIOption *
ioptions_list_get_ask_option( const NAIOptionsList *instance, GtkWidget *container )
{
- return( na_importer_get_ask_mode());
+ return( fma_importer_get_ask_mode());
}
static void
@@ -643,11 +643,11 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
{
static const gchar *thisfn = "nact_assistant_import_assistant_apply";
NactAssistantImport *window;
- NAImporterParms importer_parms;
+ FMAImporterParms importer_parms;
BaseWindow *main_window;
GList *import_results, *it;
GList *insertable_items, *overriden_items;
- NAImporterResult *result;
+ FMAImporterResult *result;
NactApplication *application;
NAUpdater *updater;
NactTreeView *items_view;
@@ -660,20 +660,20 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
application = NACT_APPLICATION( base_window_get_application( main_window ));
updater = nact_application_get_updater( application );
- memset( &importer_parms, '\0', sizeof( NAImporterParms ));
+ memset( &importer_parms, '\0', sizeof( FMAImporterParms ));
importer_parms.uris = gtk_file_chooser_get_uris( GTK_FILE_CHOOSER( window->private->file_chooser ));
- importer_parms.check_fn = ( NAImporterCheckFn ) check_for_existence;
+ importer_parms.check_fn = ( FMAImporterCheckFn ) check_for_existence;
importer_parms.check_fn_data = main_window;
importer_parms.preferred_mode = na_import_mode_get_id( NA_IMPORT_MODE( window->private->mode ));
importer_parms.parent_toplevel = base_window_get_gtk_toplevel( BASE_WINDOW( wnd ));
- import_results = na_importer_import_from_uris( NA_PIVOT( updater ), &importer_parms );
+ import_results = fma_importer_import_from_uris( NA_PIVOT( updater ), &importer_parms );
insertable_items = NULL;
overriden_items = NULL;
for( it = import_results ; it ; it = it->next ){
- result = ( NAImporterResult * ) it->data;
+ result = ( FMAImporterResult * ) it->data;
if( result->imported ){
if( !result->exist || result->mode == IMPORTER_MODE_RENUMBER ){
@@ -747,7 +747,7 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
GtkWidget *file_vbox, *file_uri, *file_report;
GList *is;
GSList *im;
- NAImporterResult *result;
+ FMAImporterResult *result;
gchar *text, *id, *item_label, *text2, *tmp;
const gchar *color;
gchar *mode_id;
@@ -773,7 +773,7 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
* - display a brief import log
*/
for( is = window->private->results ; is ; is = is->next ){
- result = ( NAImporterResult * ) is->data;
+ result = ( FMAImporterResult * ) is->data;
g_debug( "%s: uri=%s", thisfn, result->uri );
/* display the uri
@@ -852,7 +852,7 @@ free_results( GList *list )
GList *it;
for( it = list ; it ; it = it->next ){
- na_importer_free_result(( NAImporterResult * ) it->data );
+ fma_importer_free_result(( FMAImporterResult * ) it->data );
}
g_list_free( list );
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index fb8e589..d50dd13 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -41,7 +41,7 @@
#include <core/fma-export-format.h>
#include <core/fma-gtk-utils.h>
#include <core/na-import-mode.h>
-#include <core/na-importer.h>
+#include <core/fma-importer.h>
#include <core/na-ioptions-list.h>
#include <core/na-iprefs.h>
#include <core/na-tokens.h>
@@ -271,7 +271,7 @@ ioptions_list_get_options( const NAIOptionsList *instance, GtkWidget *container
options = fma_exporter_get_formats( NA_PIVOT( updater ));
} else if( container == base_window_get_widget( BASE_WINDOW( instance ), "PreferencesImportModeVBox"
)){
- options = na_importer_get_modes();
+ options = fma_importer_get_modes();
} else {
g_warning( "%s: container=%p (%s): unmanaged container",
@@ -293,7 +293,7 @@ ioptions_list_free_options( const NAIOptionsList *instance, GtkWidget *container
fma_exporter_free_formats( options );
} else if( container == base_window_get_widget( BASE_WINDOW( instance ), "PreferencesImportModeVBox"
)){
- na_importer_free_modes( options );
+ fma_importer_free_modes( options );
} else {
g_warning( "%s: container=%p (%s): unmanaged container",
@@ -316,7 +316,7 @@ ioptions_list_get_ask_option( const NAIOptionsList *instance, GtkWidget *contain
option = fma_exporter_get_ask_option();
} else if( container == base_window_get_widget( BASE_WINDOW( instance ), "PreferencesImportModeVBox"
)){
- option = na_importer_get_ask_mode();
+ option = fma_importer_get_ask_mode();
} else {
g_warning( "%s: container=%p (%s): unmanaged container",
diff --git a/src/nact/nact-tree-model-dnd.c b/src/nact/nact-tree-model-dnd.c
index 88fd544..a2a5b7f 100644
--- a/src/nact/nact-tree-model-dnd.c
+++ b/src/nact/nact-tree-model-dnd.c
@@ -39,7 +39,7 @@
#include <api/fma-object-api.h>
#include <core/fma-gnome-vfs-uri.h>
-#include <core/na-importer.h>
+#include <core/fma-importer.h>
#include "nact-application.h"
#include "nact-clipboard.h"
@@ -867,7 +867,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
GtkApplication *application;
NAUpdater *updater;
NactMainWindow *main_window;
- NAImporterParms parms;
+ FMAImporterParms parms;
GList *import_results, *it;
guint count;
GSList *im;
@@ -902,14 +902,14 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
selection_data_data = ( const gchar * ) gtk_selection_data_get_data( selection_data );
g_debug( "%s", selection_data_data );
- memset( &parms, '\0', sizeof( NAImporterParms ));
+ memset( &parms, '\0', sizeof( FMAImporterParms ));
parms.uris = g_slist_reverse( fma_core_utils_slist_from_split( selection_data_data, "\r\n" ));
- parms.check_fn = ( NAImporterCheckFn ) is_dropped_already_exists;
+ parms.check_fn = ( FMAImporterCheckFn ) is_dropped_already_exists;
parms.check_fn_data = main_window;
parms.preferred_mode = 0;
parms.parent_toplevel = GTK_WINDOW( main_window );
- import_results = na_importer_import_from_uris( NA_PIVOT( updater ), &parms );
+ import_results = fma_importer_import_from_uris( NA_PIVOT( updater ), &parms );
/* analysing output results, simultaneously building a concatenation
* of all lines of messages, and the list of imported items
@@ -919,7 +919,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
messages = NULL;
for( it = import_results ; it ; it = it->next ){
- NAImporterResult *result = ( NAImporterResult * ) it->data;
+ FMAImporterResult *result = ( FMAImporterResult * ) it->data;
for( im = result->messages ; im ; im = im->next ){
messages = g_slist_prepend( messages, im->data );
@@ -983,7 +983,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
fma_core_utils_slist_free( parms.uris );
for( it = import_results ; it ; it = it->next ){
- na_importer_free_result( it->data );
+ fma_importer_free_result( it->data );
}
g_list_free( import_results );
diff --git a/src/test/test-reader.c b/src/test/test-reader.c
index c43392c..892f804 100755
--- a/src/test/test-reader.c
+++ b/src/test/test-reader.c
@@ -37,7 +37,7 @@
#include <api/fma-core-utils.h>
#include <core/na-pivot.h>
-#include <core/na-importer.h>
+#include <core/fma-importer.h>
static gchar *uri = "";
static gboolean version = FALSE;
@@ -63,9 +63,9 @@ static void exit_with_usage( void );
int
main( int argc, char **argv )
{
- NAImporterParms parms;
+ FMAImporterParms parms;
GList *import_results;
- NAImporterResult *result;
+ FMAImporterResult *result;
#if !GLIB_CHECK_VERSION( 2,36, 0 )
g_type_init();
@@ -84,7 +84,7 @@ main( int argc, char **argv )
parms.preferred_mode = IMPORTER_MODE_ASK;
parms.parent_toplevel = NULL;
- import_results = na_importer_import_from_uris( pivot, &parms );
+ import_results = fma_importer_import_from_uris( pivot, &parms );
result = import_results->data;
if( result->imported ){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]