[nautilus-actions] Rename NAExporterStr structure as NAIExporterFormat



commit e0aee062405c9819d6e54b7a722d2477a55586c8
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Mar 1 22:08:44 2010 +0100

    Rename NAExporterStr structure as NAIExporterFormat

 ChangeLog                     |    9 +++++++++
 src/api/na-iexporter.h        |   25 ++++++++++++++++++++-----
 src/core/na-export-format.c   |    8 ++++----
 src/core/na-export-format.h   |    2 +-
 src/core/na-exporter.c        |    8 ++++----
 src/core/na-iexporter.c       |    4 ++--
 src/io-xml/naxml-provider.c   |    6 +++---
 src/nact/nact-export-format.c |    2 +-
 8 files changed, 44 insertions(+), 20 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ae3024f..be0bc3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-03-01 Pierre Wieser <pwieser trychlos org>
 
+	* src/api/na-iexporter.h:
+	* src/core/na-export-format.c:
+	* src/core/na-export-format.h:
+	* src/core/na-exporter.c:
+	* src/core/na-iexporter.c:
+	* src/io-xml/naxml-provider.c:
+	* src/nact/nact-export-format.c:
+	NAExporterStr structure is renamed as NAIExporterFormat.
+
 	* src/api/na-iimporter.h (from_uri):
 	Rename the API function to be consistant with NAIExporter interface.
 
diff --git a/src/api/na-iexporter.h b/src/api/na-iexporter.h
index 39a4f07..70d3423 100644
--- a/src/api/na-iexporter.h
+++ b/src/api/na-iexporter.h
@@ -51,6 +51,7 @@ G_BEGIN_DECLS
 #define NA_IEXPORTER_GET_INTERFACE( instance )	( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_IEXPORTER_TYPE, NAIExporterInterface ))
 
 typedef struct NAIExporter                 NAIExporter;
+typedef struct NAIExporterFileParms        NAIExporterFileParms;
 
 typedef struct NAIExporterInterfacePrivate NAIExporterInterfacePrivate;
 
@@ -63,7 +64,7 @@ typedef struct {
 	gchar *wnd_label;				/* short label to be displayed in the UI (UTF-8 locale) */
 	gchar *description;				/* full description of the format (UTF-8 locale) */
 }
-	NAExporterStr;
+	NAIExporterFormat;
 
 typedef struct {
 	GTypeInterface             parent;
@@ -83,7 +84,7 @@ typedef struct {
 	 * get_formats:
 	 * @instance: this #NAIExporter instance.
 	 *
-	 * Returns: a list of #NAExporterStr structures which describe the
+	 * Returns: a list of #NAIExporterFormat structures which describe the
 	 * formats supported by @instance.
 	 *
 	 * Defaults to %NULL (no format at all).
@@ -96,7 +97,7 @@ typedef struct {
 	 * export format, and so need a new format id, please contact the
 	 * maintainers (see #nautilus-actions.doap).
 	 */
-	const NAExporterStr * ( *get_formats )( const NAIExporter *instance );
+	const NAIExporterFormat * ( *get_formats )( const NAIExporter *instance );
 
 	/**
 	 * to_file:
@@ -130,8 +131,6 @@ typedef struct {
 }
 	NAIExporterInterface;
 
-GType na_iexporter_get_type( void );
-
 /* The reasons for which an item may not have been exported
  */
 enum {
@@ -143,6 +142,22 @@ enum {
 	NA_IEXPORTER_CODE_ERROR,
 };
 
+/* parameters via a structure
+ * ... when exporting to a file
+ */
+struct NAIExporterFileParms {
+	guint              version;			/* i 1: version of this structure */
+	NAObjectItem      *exported;		/* i 1: exported NAObjectItem-derived object */
+	gchar             *folder;			/* i 1: URI of the target folder */
+	GQuark             format;			/* i 1: export format as a GQuark */
+	gchar             *basename;		/*  o1: basename of the exported file */
+	GSList            *messages;		/* io1: a #GSList list of localized strings;
+										 *       the provider may append messages to this list,
+										 *       but shouldn't reinitialize it. */
+};
+
+GType na_iexporter_get_type( void );
+
 G_END_DECLS
 
 #endif /* __NAUTILUS_ACTIONS_API_NA_IEXPORTER_H__ */
diff --git a/src/core/na-export-format.c b/src/core/na-export-format.c
index f818e7d..e2eb774 100644
--- a/src/core/na-export-format.c
+++ b/src/core/na-export-format.c
@@ -45,7 +45,7 @@ struct NAExportFormatClassPrivate {
 struct NAExportFormatPrivate {
 	gboolean       dispose_has_run;
 	GQuark         id;
-	NAExporterStr *str;
+	NAIExporterFormat *str;
 	NAIExporter   *exporter;
 };
 
@@ -168,20 +168,20 @@ instance_finalize( GObject *object )
 
 /**
  * na_export_format_new:
- * @str: a #NAExporterStr which describes an export format.
+ * @str: a #NAIExporterFormat which describes an export format.
  * @exporter: the #NAIExporter which provides this export format.
  *
  * Returns: a newly allocated #NAExportFormat object.
  */
 NAExportFormat *
-na_export_format_new( const NAExporterStr *str, const NAIExporter *exporter )
+na_export_format_new( const NAIExporterFormat *str, const NAIExporter *exporter )
 {
 	NAExportFormat *format;
 
 	format = g_object_new( NA_EXPORT_FORMAT_TYPE, NULL );
 
 	format->private->id = g_quark_from_string( str->format );
-	format->private->str = ( NAExporterStr * ) str;
+	format->private->str = ( NAIExporterFormat * ) str;
 	format->private->exporter = ( NAIExporter * ) exporter;
 
 	return( format );
diff --git a/src/core/na-export-format.h b/src/core/na-export-format.h
index cfd6347..d121a1a 100644
--- a/src/core/na-export-format.h
+++ b/src/core/na-export-format.h
@@ -66,7 +66,7 @@ typedef struct {
 
 GType           na_export_format_get_type( void );
 
-NAExportFormat *na_export_format_new( const NAExporterStr *format, const NAIExporter *exporter );
+NAExportFormat *na_export_format_new( const NAIExporterFormat *format, const NAIExporter *exporter );
 
 GQuark          na_export_format_get_quark      ( const NAExportFormat *format );
 gchar          *na_export_format_get_id         ( const NAExportFormat *format );
diff --git a/src/core/na-exporter.c b/src/core/na-exporter.c
index 0bd59ea..8249d44 100644
--- a/src/core/na-exporter.c
+++ b/src/core/na-exporter.c
@@ -40,7 +40,7 @@
 extern gboolean iexporter_initialized;
 extern gboolean iexporter_finalized;
 
-static const NAExporterStr *exporter_get_formats( const NAIExporter *exporter );
+static const NAIExporterFormat *exporter_get_formats( const NAIExporter *exporter );
 
 /**
  * na_exporter_get_formats:
@@ -55,7 +55,7 @@ na_exporter_get_formats( const NAPivot *pivot )
 {
 	GList *iexporters, *imod;
 	GList *formats;
-	const NAExporterStr *str;
+	const NAIExporterFormat *str;
 	NAExportFormat *format;
 
 	formats = NULL;
@@ -80,10 +80,10 @@ na_exporter_get_formats( const NAPivot *pivot )
 	return( formats );
 }
 
-static const NAExporterStr *
+static const NAIExporterFormat *
 exporter_get_formats( const NAIExporter *exporter )
 {
-	const NAExporterStr *str;
+	const NAIExporterFormat *str;
 
 	str = NULL;
 
diff --git a/src/core/na-iexporter.c b/src/core/na-iexporter.c
index 36e9f76..e75bf1e 100644
--- a/src/core/na-iexporter.c
+++ b/src/core/na-iexporter.c
@@ -48,7 +48,7 @@ static void                 interface_base_init( NAIExporterInterface *klass );
 static void                 interface_base_finalize( NAIExporterInterface *klass );
 
 static guint                iexporter_get_version( const NAIExporter *instance );
-static const NAExporterStr *iexporter_get_formats( const NAIExporter *instance );
+static const NAIExporterFormat *iexporter_get_formats( const NAIExporter *instance );
 
 /**
  * na_iexporter_get_type:
@@ -140,7 +140,7 @@ iexporter_get_version( const NAIExporter *instance )
 	return( 1 );
 }
 
-static const NAExporterStr *
+static const NAIExporterFormat *
 iexporter_get_formats( const NAIExporter *instance )
 {
 	return( NULL );
diff --git a/src/io-xml/naxml-provider.c b/src/io-xml/naxml-provider.c
index d6c717e..2f3dc36 100644
--- a/src/io-xml/naxml-provider.c
+++ b/src/io-xml/naxml-provider.c
@@ -53,7 +53,7 @@ struct NAXMLProviderPrivate {
 	gboolean dispose_has_run;
 };
 
-static NAExporterStr st_formats[] = {
+static NAIExporterFormat st_formats[] = {
 
 	/* GCONF_SCHEMA_V1: a schema with owner, short and long descriptions;
 	 * each action has its own schema addressed by the id
@@ -104,7 +104,7 @@ static guint                iimporter_get_version( const NAIImporter *importer )
 
 static void                 iexporter_iface_init( NAIExporterInterface *iface );
 static guint                iexporter_get_version( const NAIExporter *exporter );
-static const NAExporterStr *iexporter_get_formats( const NAIExporter *exporter );
+static const NAIExporterFormat *iexporter_get_formats( const NAIExporter *exporter );
 
 static void                 ifactory_provider_iface_init( NAIFactoryProviderInterface *iface );
 static guint                ifactory_provider_get_version( const NAIFactoryProvider *factory );
@@ -267,7 +267,7 @@ iexporter_get_version( const NAIExporter *exporter )
 	return( 1 );
 }
 
-static const NAExporterStr *
+static const NAIExporterFormat *
 iexporter_get_formats( const NAIExporter *exporter )
 {
 	return( st_formats );
diff --git a/src/nact/nact-export-format.c b/src/nact/nact-export-format.c
index 366eb50..58b9513 100755
--- a/src/nact/nact-export-format.c
+++ b/src/nact/nact-export-format.c
@@ -58,7 +58,7 @@ typedef struct {
 }
 	NactExportFormatStr;
 
-static const NAExporterStr ask_str = { NULL, ASKME_LABEL, ASKME_LABEL, ASKME_DESCRIPTION };
+static const NAIExporterFormat ask_str = { NULL, ASKME_LABEL, ASKME_LABEL, ASKME_DESCRIPTION };
 
 static void draw_in_vbox( const NAExportFormat *format, GtkWidget *vbox, guint mode, gint id );
 static void select_default_iter( GtkWidget *widget, NactExportFormatStr *str );



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