[nautilus-actions] NAExportFormat class renamed to FMAExportFormat



commit fa495e4c516909c9ac472a91a268d98d11e15ce5
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Sep 7 23:27:05 2015 +0200

    NAExportFormat class renamed to FMAExportFormat

 src/core/Makefile.am                               |    4 +-
 .../{na-export-format.c => fma-export-format.c}    |   96 ++++++++++----------
 src/core/fma-export-format.h                       |   73 +++++++++++++++
 src/core/fma-exporter.c                            |   18 ++--
 src/core/na-export-format.h                        |   73 ---------------
 src/core/na-ioption.c                              |    2 +-
 src/nact/nact-assistant-export.c                   |    4 +-
 src/nact/nact-clipboard.c                          |    2 +-
 src/nact/nact-export-ask.c                         |    4 +-
 src/nact/nact-preferences-editor.c                 |    4 +-
 src/utils/nautilus-actions-print.c                 |    2 +-
 11 files changed, 141 insertions(+), 141 deletions(-)
---
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 6f92b37..a4f5333 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -62,8 +62,8 @@ libna_core_la_SOURCES = \
        fma-desktop-environment.h                                                       \
        fma-exporter.c                                                                          \
        fma-exporter.h                                                                          \
-       na-export-format.c                                                                      \
-       na-export-format.h                                                                      \
+       fma-export-format.c                                                                     \
+       fma-export-format.h                                                                     \
        na-factory-object.c                                                                     \
        na-factory-object.h                                                                     \
        na-factory-provider.c                                                           \
diff --git a/src/core/na-export-format.c b/src/core/fma-export-format.c
similarity index 76%
rename from src/core/na-export-format.c
rename to src/core/fma-export-format.c
index aaa7e8e..4cf8a95 100644
--- a/src/core/na-export-format.c
+++ b/src/core/fma-export-format.c
@@ -31,18 +31,18 @@
 #include <config.h>
 #endif
 
-#include "na-export-format.h"
+#include "fma-export-format.h"
 #include "na-ioption.h"
 
 /* private class data
  */
-struct _NAExportFormatClassPrivate {
+struct _FMAExportFormatClassPrivate {
        void *empty;                                            /* so that gcc -pedantic is happy */
 };
 
 /* private instance data
  */
-struct _NAExportFormatPrivate {
+struct _FMAExportFormatPrivate {
        gboolean     dispose_has_run;
        gchar       *format;
        gchar       *label;
@@ -54,7 +54,7 @@ struct _NAExportFormatPrivate {
 static GObjectClass *st_parent_class = NULL;
 
 static GType      register_type( void );
-static void       class_init( NAExportFormatClass *klass );
+static void       class_init( FMAExportFormatClass *klass );
 static void       ioption_iface_init( NAIOptionInterface *iface, void *user_data );
 static void       instance_init( GTypeInstance *instance, gpointer klass );
 static void       instance_dispose( GObject *object );
@@ -65,7 +65,7 @@ static gchar     *ioption_get_description( const NAIOption *option );
 static GdkPixbuf *ioption_get_pixbuf( const NAIOption *option );
 
 GType
-na_export_format_get_type( void )
+fma_export_format_get_type( void )
 {
        static GType object_type = 0;
 
@@ -79,17 +79,17 @@ na_export_format_get_type( void )
 static GType
 register_type( void )
 {
-       static const gchar *thisfn = "na_export_format_register_type";
+       static const gchar *thisfn = "fma_export_format_register_type";
        GType type;
 
        static GTypeInfo info = {
-               sizeof( NAExportFormatClass ),
+               sizeof( FMAExportFormatClass ),
                ( GBaseInitFunc ) NULL,
                ( GBaseFinalizeFunc ) NULL,
                ( GClassInitFunc ) class_init,
                NULL,
                NULL,
-               sizeof( NAExportFormat ),
+               sizeof( FMAExportFormat ),
                0,
                ( GInstanceInitFunc ) instance_init
        };
@@ -102,7 +102,7 @@ register_type( void )
 
        g_debug( "%s", thisfn );
 
-       type = g_type_register_static( G_TYPE_OBJECT, "NAExportFormat", &info, 0 );
+       type = g_type_register_static( G_TYPE_OBJECT, "FMAExportFormat", &info, 0 );
 
        g_type_add_interface_static( type, NA_TYPE_IOPTION, &ioption_iface_info );
 
@@ -110,9 +110,9 @@ register_type( void )
 }
 
 static void
-class_init( NAExportFormatClass *klass )
+class_init( FMAExportFormatClass *klass )
 {
-       static const gchar *thisfn = "na_export_format_class_init";
+       static const gchar *thisfn = "fma_export_format_class_init";
        GObjectClass *object_class;
 
        g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -123,13 +123,13 @@ class_init( NAExportFormatClass *klass )
        object_class->dispose = instance_dispose;
        object_class->finalize = instance_finalize;
 
-       klass->private = g_new0( NAExportFormatClassPrivate, 1 );
+       klass->private = g_new0( FMAExportFormatClassPrivate, 1 );
 }
 
 static void
 ioption_iface_init( NAIOptionInterface *iface, void *user_data )
 {
-       static const gchar *thisfn = "na_export_format_ioption_iface_init";
+       static const gchar *thisfn = "fma_export_format_ioption_iface_init";
 
        g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
 
@@ -150,10 +150,10 @@ static gchar *
 ioption_get_id( const NAIOption *option )
 {
        gchar *id;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( option ), NULL );
-       format = NA_EXPORT_FORMAT( option );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( option ), NULL );
+       format = FMA_EXPORT_FORMAT( option );
        id = NULL;
 
        if( !format->private->dispose_has_run ){
@@ -175,10 +175,10 @@ static gchar *
 ioption_get_label( const NAIOption *option )
 {
        gchar *label;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( option ), NULL );
-       format = NA_EXPORT_FORMAT( option );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( option ), NULL );
+       format = FMA_EXPORT_FORMAT( option );
        label = NULL;
 
        if( !format->private->dispose_has_run ){
@@ -200,10 +200,10 @@ static gchar *
 ioption_get_description( const NAIOption *option )
 {
        gchar *description;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( option ), NULL );
-       format = NA_EXPORT_FORMAT( option );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( option ), NULL );
+       format = FMA_EXPORT_FORMAT( option );
        description = NULL;
 
        if( !format->private->dispose_has_run ){
@@ -225,10 +225,10 @@ static GdkPixbuf *
 ioption_get_pixbuf( const NAIOption *option )
 {
        GdkPixbuf *pixbuf;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( option ), NULL );
-       format = NA_EXPORT_FORMAT( option );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( option ), NULL );
+       format = FMA_EXPORT_FORMAT( option );
        pixbuf = NULL;
 
        if( !format->private->dispose_has_run ){
@@ -242,16 +242,16 @@ ioption_get_pixbuf( const NAIOption *option )
 static void
 instance_init( GTypeInstance *instance, gpointer klass )
 {
-       static const gchar *thisfn = "na_export_format_instance_init";
-       NAExportFormat *self;
+       static const gchar *thisfn = "fma_export_format_instance_init";
+       FMAExportFormat *self;
 
-       g_return_if_fail( NA_IS_EXPORT_FORMAT( instance ));
+       g_return_if_fail( FMA_IS_EXPORT_FORMAT( instance ));
 
        g_debug( "%s: instance=%p (%s), klass=%p",
                        thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-       self = NA_EXPORT_FORMAT( instance );
+       self = FMA_EXPORT_FORMAT( instance );
 
-       self->private = g_new0( NAExportFormatPrivate, 1 );
+       self->private = g_new0( FMAExportFormatPrivate, 1 );
 
        self->private->dispose_has_run = FALSE;
 }
@@ -259,12 +259,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
 static void
 instance_dispose( GObject *object )
 {
-       static const gchar *thisfn = "na_export_format_instance_dispose";
-       NAExportFormat *self;
+       static const gchar *thisfn = "fma_export_format_instance_dispose";
+       FMAExportFormat *self;
 
-       g_return_if_fail( NA_IS_EXPORT_FORMAT( object ));
+       g_return_if_fail( FMA_IS_EXPORT_FORMAT( object ));
 
-       self = NA_EXPORT_FORMAT( object );
+       self = FMA_EXPORT_FORMAT( object );
 
        if( !self->private->dispose_has_run ){
 
@@ -292,13 +292,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
-       static const gchar *thisfn = "na_export_format_instance_finalize";
-       NAExportFormat *self;
+       static const gchar *thisfn = "fma_export_format_instance_finalize";
+       FMAExportFormat *self;
 
-       g_return_if_fail( NA_IS_EXPORT_FORMAT( object ));
+       g_return_if_fail( FMA_IS_EXPORT_FORMAT( object ));
 
        g_debug( "%s: object=%p", thisfn, ( void * ) object );
-       self = NA_EXPORT_FORMAT( object );
+       self = FMA_EXPORT_FORMAT( object );
 
        g_free( self->private->format );
        g_free( self->private->label );
@@ -312,17 +312,17 @@ instance_finalize( GObject *object )
 }
 
 /*
- * na_export_format_new:
+ * fma_export_format_new:
  * @exporter_format: a #FMAIExporterFormatv2 which describes an export format.
  *
- * Returns: a newly allocated #NAExportFormat object.
+ * Returns: a newly allocated #FMAExportFormat object.
  */
-NAExportFormat *
-na_export_format_new( const FMAIExporterFormatv2 *exporter_format )
+FMAExportFormat *
+fma_export_format_new( const FMAIExporterFormatv2 *exporter_format )
 {
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
-       format = g_object_new( NA_TYPE_EXPORT_FORMAT, NULL );
+       format = g_object_new( FMA_TYPE_EXPORT_FORMAT, NULL );
 
        format->private->format = g_strdup( exporter_format->format );
        format->private->label = g_strdup( exporter_format->label );
@@ -334,8 +334,8 @@ na_export_format_new( const FMAIExporterFormatv2 *exporter_format )
 }
 
 /*
- * na_export_format_get_provider:
- * @format: this #NAExportFormat object.
+ * fma_export_format_get_provider:
+ * @format: this #FMAExportFormat object.
  *
  * Returns: a pointer to the #FMAIExporter which provides this format.
  *
@@ -343,11 +343,11 @@ na_export_format_new( const FMAIExporterFormatv2 *exporter_format )
  * by the caller.
  */
 FMAIExporter *
-na_export_format_get_provider( const NAExportFormat *format )
+fma_export_format_get_provider( const FMAExportFormat *format )
 {
        FMAIExporter *exporter;
 
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( format ), NULL );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( format ), NULL );
 
        exporter = NULL;
 
diff --git a/src/core/fma-export-format.h b/src/core/fma-export-format.h
new file mode 100644
index 0000000..4978805
--- /dev/null
+++ b/src/core/fma-export-format.h
@@ -0,0 +1,73 @@
+/*
+ * 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_EXPORT_FORMAT_H__
+#define __CORE_FMA_EXPORT_FORMAT_H__
+
+/* @title: FMAExportFormat
+ * @short_description: The #FMAExportFormat Class Definition
+ * @include: core/fma-export-format.h
+ */
+
+#include <api/fma-iexporter.h>
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_EXPORT_FORMAT                ( fma_export_format_get_type())
+#define FMA_EXPORT_FORMAT( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_EXPORT_FORMAT, 
FMAExportFormat ))
+#define FMA_EXPORT_FORMAT_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_EXPORT_FORMAT, 
FMAExportFormatClass ))
+#define FMA_IS_EXPORT_FORMAT( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_EXPORT_FORMAT ))
+#define FMA_IS_EXPORT_FORMAT_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_EXPORT_FORMAT ))
+#define FMA_EXPORT_FORMAT_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), 
FMA_TYPE_EXPORT_FORMAT, FMAExportFormatClass ))
+
+typedef struct _FMAExportFormatPrivate        FMAExportFormatPrivate;
+
+typedef struct {
+       GObject                 parent;
+       FMAExportFormatPrivate *private;
+}
+       FMAExportFormat;
+
+typedef struct _FMAExportFormatClassPrivate   FMAExportFormatClassPrivate;
+
+typedef struct {
+       GObjectClass                 parent;
+       FMAExportFormatClassPrivate *private;
+}
+       FMAExportFormatClass;
+
+GType            fma_export_format_get_type    ( void );
+
+FMAExportFormat *fma_export_format_new         ( const FMAIExporterFormatv2 *exporter_format );
+
+FMAIExporter    *fma_export_format_get_provider( const FMAExportFormat *format );
+
+G_END_DECLS
+
+#endif /* __CORE_FMA_EXPORT_FORMAT_H__ */
diff --git a/src/core/fma-exporter.c b/src/core/fma-exporter.c
index 9de86ac..1df9166 100644
--- a/src/core/fma-exporter.c
+++ b/src/core/fma-exporter.c
@@ -36,7 +36,7 @@
 #include <string.h>
 
 #include "fma-exporter.h"
-#include "na-export-format.h"
+#include "fma-export-format.h"
 #include "na-settings.h"
 
 typedef struct {
@@ -68,7 +68,7 @@ static void   on_pixbuf_finalized( gpointer user_data, GObject *pixbuf );
  * fma_exporter_get_formats:
  * @pivot: the #NAPivot instance.
  *
- * Returns: a list of #NAExportFormat objects, each of them addressing an
+ * Returns: a list of #FMAExportFormat objects, each of them addressing an
  * available export format, i.e. a format provided by a module which
  * implement the #FMAIExporter interface.
  *
@@ -80,7 +80,7 @@ fma_exporter_get_formats( const NAPivot *pivot )
        GList *iexporters, *imod;
        GList *formats;
        GList *str_list, *is;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
        g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
 
@@ -91,7 +91,7 @@ fma_exporter_get_formats( const NAPivot *pivot )
                str_list = exporter_get_formats( FMA_IEXPORTER( imod->data ));
 
                for( is = str_list ; is ; is = is->next ){
-                       format = na_export_format_new(( FMAIExporterFormatv2 * ) is->data );
+                       format = fma_export_format_new(( FMAIExporterFormatv2 * ) is->data );
                        formats = g_list_prepend( formats, format );
                }
 
@@ -204,7 +204,7 @@ fma_exporter_get_ask_option( void )
        FMAIExporterFormatv2 *str;
        gint width, height;
        gchar *fname;
-       NAExportFormat *format;
+       FMAExportFormat *format;
 
        if( !gtk_icon_size_lookup( GTK_ICON_SIZE_DIALOG, &width, &height )){
                width = height = 48;
@@ -226,7 +226,7 @@ fma_exporter_get_ask_option( void )
                }
        }
 
-       format = na_export_format_new( str );
+       format = fma_export_format_new( str );
 
        if( str->pixbuf ){
                g_object_unref( str->pixbuf );
@@ -418,7 +418,7 @@ fma_exporter_find_for_format( const NAPivot *pivot, const gchar *format )
        FMAIExporter *exporter;
        GList *formats, *ifmt;
        gchar *id;
-       NAExportFormat *export_format;
+       FMAExportFormat *export_format;
 
        g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
 
@@ -427,10 +427,10 @@ fma_exporter_find_for_format( const NAPivot *pivot, const gchar *format )
 
        for( ifmt = formats ; ifmt && !exporter ; ifmt = ifmt->next ){
 
-               export_format = NA_EXPORT_FORMAT( ifmt->data );
+               export_format = FMA_EXPORT_FORMAT( ifmt->data );
                id = na_ioption_get_id( NA_IOPTION( export_format ));
                if( !strcmp( id, format )){
-                       exporter = na_export_format_get_provider( NA_EXPORT_FORMAT( ifmt->data ));
+                       exporter = fma_export_format_get_provider( FMA_EXPORT_FORMAT( ifmt->data ));
                }
                g_free( id );
        }
diff --git a/src/core/na-ioption.c b/src/core/na-ioption.c
index 1344601..a178258 100644
--- a/src/core/na-ioption.c
+++ b/src/core/na-ioption.c
@@ -228,7 +228,7 @@ na_ioption_get_label( const NAIOption *option )
 
 /*
  * na_ioption_get_description:
- * @format: this #NAExportFormat object.
+ * @format: this #FMAExportFormat object.
  *
  * Returns: the UTF-8 localizable description of the format, as a newly
  * allocated string which should be g_free() by the caller.
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index e156bfa..3d903d4 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -38,7 +38,7 @@
 #include "api/fma-object-api.h"
 
 #include "core/fma-exporter.h"
-#include "core/na-export-format.h"
+#include "core/fma-export-format.h"
 #include "core/na-gtk-utils.h"
 #include "core/na-ioptions-list.h"
 
@@ -715,7 +715,7 @@ assist_prepare_confirm( NactAssistantExport *window, GtkAssistant *assistant, Gt
        tree_view = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( format_page ), "p3-ExportFormatTreeView" 
);
        g_return_if_fail( GTK_IS_TREE_VIEW( tree_view ));
        format = na_ioptions_list_get_selected( NA_IOPTIONS_LIST( window ), tree_view );
-       g_return_if_fail( NA_IS_EXPORT_FORMAT( format ));
+       g_return_if_fail( FMA_IS_EXPORT_FORMAT( format ));
 
        format_label = na_ioption_get_label( format );
        format_label2 = fma_core_utils_str_remove_char( format_label, "_" );
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index 104055a..b5a9563 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -37,7 +37,7 @@
 #include "api/fma-object-api.h"
 
 #include "core/fma-exporter.h"
-#include "core/na-export-format.h"
+#include "core/fma-export-format.h"
 
 #include "nact-application.h"
 #include "nact-export-ask.h"
diff --git a/src/nact/nact-export-ask.c b/src/nact/nact-export-ask.c
index a848c41..f1f37d3 100644
--- a/src/nact/nact-export-ask.c
+++ b/src/nact/nact-export-ask.c
@@ -36,7 +36,7 @@
 #include "api/fma-object-api.h"
 
 #include "core/fma-exporter.h"
-#include "core/na-export-format.h"
+#include "core/fma-export-format.h"
 #include "core/na-gtk-utils.h"
 #include "core/na-ioptions-list.h"
 
@@ -472,7 +472,7 @@ get_export_format( NactExportAsk *editor )
 
        widget = base_window_get_widget( BASE_WINDOW( editor ), "export-format-ask" );
        format = na_ioptions_list_get_selected( NA_IOPTIONS_LIST( editor ), widget );
-       g_return_val_if_fail( NA_IS_EXPORT_FORMAT( format ), 0 );
+       g_return_val_if_fail( FMA_IS_EXPORT_FORMAT( format ), 0 );
 
        if( !editor->private->keep_last_choice_mandatory ){
                na_settings_set_boolean( NA_IPREFS_EXPORT_ASK_USER_KEEP_LAST_CHOICE, 
editor->private->keep_last_choice );
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index d25010c..2f3faee 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -38,7 +38,7 @@
 
 #include <core/fma-desktop-environment.h>
 #include <core/fma-exporter.h>
-#include <core/na-export-format.h>
+#include <core/fma-export-format.h>
 #include <core/na-gtk-utils.h>
 #include <core/na-import-mode.h>
 #include <core/na-importer.h>
@@ -1257,7 +1257,7 @@ on_dialog_ok( BaseDialog *dialog )
                        container = base_window_get_widget( BASE_WINDOW( editor ), 
"PreferencesExportFormatVBox" );
                        option = na_ioptions_list_get_selected( NA_IOPTIONS_LIST( editor ), container );
                        g_debug( "nact_preferences_editor_on_dialog_ok: option=%p", ( void * ) option );
-                       g_return_if_fail( NA_IS_EXPORT_FORMAT( option ));
+                       g_return_if_fail( FMA_IS_EXPORT_FORMAT( option ));
                        export_format = na_ioption_get_id( option );
                        na_settings_set_string( NA_IPREFS_EXPORT_PREFERRED_FORMAT, export_format );
                        g_free( export_format );
diff --git a/src/utils/nautilus-actions-print.c b/src/utils/nautilus-actions-print.c
index d47549c..f74d840 100644
--- a/src/utils/nautilus-actions-print.c
+++ b/src/utils/nautilus-actions-print.c
@@ -42,7 +42,7 @@
 #include <api/fma-object-api.h>
 
 #include <core/fma-exporter.h>
-#include <core/na-export-format.h>
+#include <core/fma-export-format.h>
 #include <core/na-ioption.h>
 
 #include "console-utils.h"


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