[nautilus-actions] fma_formats is renamed to fma_desktop_formats



commit 75438c0a8d70d525afbbcd43754f687e0c8c9d43
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Sep 8 16:08:18 2015 +0200

    fma_formats is renamed to fma_desktop_formats

 src/io-desktop/Makefile.am                         |    4 +-
 .../{fma-formats.c => fma-desktop-formats.c}       |   34 ++++++++++----------
 .../{fma-formats.h => fma-desktop-formats.h}       |   12 +++---
 src/io-desktop/fma-desktop-provider.c              |    6 ++--
 src/io-desktop/fma-reader.c                        |    2 +-
 src/io-desktop/nadp-utils.c                        |   12 +++---
 src/io-desktop/nadp-utils.h                        |   12 +++---
 src/io-desktop/nadp-writer.c                       |    6 ++--
 8 files changed, 44 insertions(+), 44 deletions(-)
---
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index 6d9f81c..9996b4c 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -45,8 +45,8 @@ libna_io_desktop_la_SOURCES = \
        fma-desktop-file.h                                                                      \
        fma-desktop-provider.c                                                          \
        fma-desktop-provider.h                                                          \
-       fma-formats.c                                                                           \
-       fma-formats.h                                                                           \
+       fma-desktop-formats.c                                                           \
+       fma-desktop-formats.h                                                           \
        fma-keys.c                                                                                      \
        fma-keys.h                                                                                      \
        fma-module.c                                                                            \
diff --git a/src/io-desktop/fma-formats.c b/src/io-desktop/fma-desktop-formats.c
similarity index 81%
rename from src/io-desktop/fma-formats.c
rename to src/io-desktop/fma-desktop-formats.c
index 3097d3e..7e97b0c 100644
--- a/src/io-desktop/fma-formats.c
+++ b/src/io-desktop/fma-desktop-formats.c
@@ -37,7 +37,7 @@
 
 #include <api/fma-iexporter.h>
 
-#include "fma-formats.h"
+#include "fma-desktop-formats.h"
 
 typedef struct {
        gchar *format;
@@ -45,14 +45,14 @@ typedef struct {
        gchar *description;
        gchar *image;
 }
-       NadpExportFormat;
+       sExportFormat;
 
-static NadpExportFormat fma_formats[] = {
+static sExportFormat st_desktop_formats[] = {
 
        /* DESKTOP_V1: the initial desktop format as described in
         * http://www.filemanager-actions.org/?q=node/377
         */
-       { NADP_FORMAT_DESKTOP_V1,
+       { FMA_DESKTOP_FORMAT_V1,
                        N_( "Export as a ._desktop file" ),
                        N_( "This format has been introduced with v 3.0 serie, " \
                                "and should be your newly preferred format when exporting items.\n" \
@@ -74,20 +74,20 @@ static void on_pixbuf_finalized( const FMAIExporter* exporter, GObject *pixbuf )
 #endif
 
 /**
- * fma_formats_get_formats:
+ * fma_desktop_formats_get_formats:
  * @exporter: this #FMAIExporter provider.
  *
  * Returns: a #GList of the #FMAIExporterFormatv2 supported export formats.
  *
- * This list should be fma_formats_free_formats() by the caller.
+ * This list should be fma_desktop_formats_free_formats() by the caller.
  *
  * Since: 3.2
  */
 GList *
-fma_formats_get_formats( const FMAIExporter* exporter )
+fma_desktop_formats_get_formats( const FMAIExporter* exporter )
 {
 #if 0
-       static const gchar *thisfn = "fma_formats_get_formats";
+       static const gchar *thisfn = "fma_desktop_formats_get_formats";
 #endif
        GList *str_list;
        FMAIExporterFormatv2 *str;
@@ -101,15 +101,15 @@ fma_formats_get_formats( const FMAIExporter* exporter )
                width = height = 48;
        }
 
-       for( i = 0 ; fma_formats[i].format ; ++i ){
+       for( i = 0 ; st_desktop_formats[i].format ; ++i ){
                str = g_new0( FMAIExporterFormatv2, 1 );
                str->version = 2;
                str->provider = FMA_IEXPORTER( exporter );
-               str->format = g_strdup( fma_formats[i].format );
-               str->label = g_strdup( gettext( fma_formats[i].label ));
-               str->description = g_strdup( gettext( fma_formats[i].description ));
-               if( fma_formats[i].image ){
-                       fname = g_strdup_printf( "%s/%s", PROVIDER_DATADIR, fma_formats[i].image );
+               str->format = g_strdup( st_desktop_formats[i].format );
+               str->label = g_strdup( gettext( st_desktop_formats[i].label ));
+               str->description = g_strdup( gettext( st_desktop_formats[i].description ));
+               if( st_desktop_formats[i].image ){
+                       fname = g_strdup_printf( "%s/%s", PROVIDER_DATADIR, st_desktop_formats[i].image );
                        str->pixbuf = gdk_pixbuf_new_from_file_at_size( fname, width, height, NULL );
                        g_free( fname );
 #if 0
@@ -134,12 +134,12 @@ fma_formats_get_formats( const FMAIExporter* exporter )
 static void
 on_pixbuf_finalized( const FMAIExporter* exporter, GObject *pixbuf )
 {
-       g_debug( "fma_formats_on_pixbuf_finalized: exporter=%p, pixbuf=%p", ( void * ) exporter, ( void * ) 
pixbuf );
+       g_debug( "fma_desktop_formats_on_pixbuf_finalized: exporter=%p, pixbuf=%p", ( void * ) exporter, ( 
void * ) pixbuf );
 }
 #endif
 
 /**
- * fma_formats_free_formats:
+ * fma_desktop_formats_free_formats:
  * @formats: a #GList to be freed.
  *
  * Returns: a #GList of the #FMAIExporterFormatv2 supported export formats.
@@ -149,7 +149,7 @@ on_pixbuf_finalized( const FMAIExporter* exporter, GObject *pixbuf )
  * Since: 3.2
  */
 void
-fma_formats_free_formats( GList *formats )
+fma_desktop_formats_free_formats( GList *formats )
 {
        GList *is;
        FMAIExporterFormatv2 *str;
diff --git a/src/io-desktop/fma-formats.h b/src/io-desktop/fma-desktop-formats.h
similarity index 79%
rename from src/io-desktop/fma-formats.h
rename to src/io-desktop/fma-desktop-formats.h
index ab3bb6c..3ba01cb 100644
--- a/src/io-desktop/fma-formats.h
+++ b/src/io-desktop/fma-desktop-formats.h
@@ -27,8 +27,8 @@
  *   ... and many others (see AUTHORS)
  */
 
-#ifndef __IO_DESKTOP_FMA_FORMATS_H__
-#define __IO_DESKTOP_FMA_FORMATS_H__
+#ifndef __IO_DESKTOP_FMA_DESKTOP_FORMATS_H__
+#define __IO_DESKTOP_FMA_DESKTOP_FORMATS_H__
 
 #include <glib.h>
 
@@ -36,11 +36,11 @@
 
 G_BEGIN_DECLS
 
-#define NADP_FORMAT_DESKTOP_V1                 "Desktop1"
+#define FMA_DESKTOP_FORMAT_V1                  "Desktop1"
 
-GList *fma_formats_get_formats ( const FMAIExporter *exporter );
-void   fma_formats_free_formats( GList *formats );
+GList *fma_desktop_formats_get_formats ( const FMAIExporter *exporter );
+void   fma_desktop_formats_free_formats( GList *formats );
 
 G_END_DECLS
 
-#endif /* __IO_DESKTOP_FMA_FORMATS_H__ */
+#endif /* __IO_DESKTOP_FMA_DESKTOP_FORMATS_H__ */
diff --git a/src/io-desktop/fma-desktop-provider.c b/src/io-desktop/fma-desktop-provider.c
index 8253972..3d2482f 100644
--- a/src/io-desktop/fma-desktop-provider.c
+++ b/src/io-desktop/fma-desktop-provider.c
@@ -38,7 +38,7 @@
 #include <api/fma-ifactory-provider.h>
 
 #include "fma-desktop-provider.h"
-#include "fma-formats.h"
+#include "fma-desktop-formats.h"
 #include "fma-keys.h"
 #include "fma-monitor.h"
 #include "fma-reader.h"
@@ -328,13 +328,13 @@ iexporter_get_name( const FMAIExporter *exporter )
 static void *
 iexporter_get_formats( const FMAIExporter *exporter )
 {
-       return(( void * ) fma_formats_get_formats( exporter ));
+       return(( void * ) fma_desktop_formats_get_formats( exporter ));
 }
 
 static void
 iexporter_free_formats( const FMAIExporter *exporter, GList *format_list )
 {
-       fma_formats_free_formats( format_list );
+       fma_desktop_formats_free_formats( format_list );
 }
 
 /**
diff --git a/src/io-desktop/fma-reader.c b/src/io-desktop/fma-reader.c
index fd9c747..fef752a 100644
--- a/src/io-desktop/fma-reader.c
+++ b/src/io-desktop/fma-reader.c
@@ -621,7 +621,7 @@ read_done_item_is_writable( const FMAIFactoryProvider *provider, FMAObjectItem *
 
        ndf = reader_data->ndf;
        uri = fma_desktop_file_get_key_file_uri( ndf );
-       writable = nadp_utils_uri_is_writable( uri );
+       writable = fma_utils_uri_is_writable( uri );
        g_free( uri );
 
        return( writable );
diff --git a/src/io-desktop/nadp-utils.c b/src/io-desktop/nadp-utils.c
index 3d74abd..bcfb03a 100644
--- a/src/io-desktop/nadp-utils.c
+++ b/src/io-desktop/nadp-utils.c
@@ -42,14 +42,14 @@
 #include "nadp-utils.h"
 
 /**
- * nadp_utils_gslist_remove_from:
+ * fma_utils_gslist_remove_from:
  * @list: the #GSList from which remove the @string.
  * @string: the string to be removed.
  *
  * Removes a @string from a string list, then frees the removed @string.
  */
 GSList *
-nadp_utils_gslist_remove_from( GSList *list, const gchar *string )
+fma_utils_gslist_remove_from( GSList *list, const gchar *string )
 {
        GSList *is;
 
@@ -69,7 +69,7 @@ nadp_utils_gslist_remove_from( GSList *list, const gchar *string )
  *
  */
 gboolean
-nadp_utils_uri_delete( const gchar *uri )
+fma_utils_uri_delete( const gchar *uri )
 {
        gboolean deleted;
        gchar *scheme;
@@ -93,7 +93,7 @@ nadp_utils_uri_delete( const gchar *uri )
 }
 
 /**
- * nadp_utils_uri_is_writable:
+ * fma_utils_uri_is_writable:
  * @uri: the URI of the file to be tested.
  *
  * Returns: %TRUE if the file is writable, %FALSE else.
@@ -105,9 +105,9 @@ nadp_utils_uri_delete( const gchar *uri )
  * There is no "super-test". Just try...
  */
 gboolean
-nadp_utils_uri_is_writable( const gchar *uri )
+fma_utils_uri_is_writable( const gchar *uri )
 {
-       static const gchar *thisfn = "nadp_utils_uri_is_writable";
+       static const gchar *thisfn = "fma_utils_uri_is_writable";
        GFile *file;
        GError *error = NULL;
        GFileInfo *info;
diff --git a/src/io-desktop/nadp-utils.h b/src/io-desktop/nadp-utils.h
index c74b1bf..21371e4 100644
--- a/src/io-desktop/nadp-utils.h
+++ b/src/io-desktop/nadp-utils.h
@@ -27,18 +27,18 @@
  *   ... and many others (see AUTHORS)
  */
 
-#ifndef __NADP_UTILS_H__
-#define __NADP_UTILS_H__
+#ifndef __IO_DESKTOP_FMA_UTILS_H__
+#define __IO_DESKTOP_FMA_UTILS_H__
 
 #include <glib.h>
 
 G_BEGIN_DECLS
 
-GSList  *nadp_utils_gslist_remove_from( GSList *list, const gchar *string );
+GSList  *fma_utils_gslist_remove_from( GSList *list, const gchar *string );
 
-gboolean nadp_utils_uri_delete     ( const gchar *uri );
-gboolean nadp_utils_uri_is_writable( const gchar *uri );
+gboolean fma_utils_uri_delete     ( const gchar *uri );
+gboolean fma_utils_uri_is_writable( const gchar *uri );
 
 G_END_DECLS
 
-#endif /* __NADP_UTILS_H__ */
+#endif /* __IO_DESKTOP_FMA_UTILS_H__ */
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 9fbdee6..6f38765 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -41,7 +41,7 @@
 
 #include "fma-desktop-file.h"
 #include "fma-desktop-provider.h"
-#include "fma-formats.h"
+#include "fma-desktop-formats.h"
 #include "fma-keys.h"
 #include "nadp-utils.h"
 #include "nadp-writer.h"
@@ -57,7 +57,7 @@ typedef struct {
 
 static ExportFormatFn st_export_format_fn[] = {
 
-       { NADP_FORMAT_DESKTOP_V1,
+       { FMA_DESKTOP_FORMAT_V1,
                                        NULL },
 
        { NULL }
@@ -278,7 +278,7 @@ nadp_iio_provider_delete_item( const FMAIIOProvider *provider, const FMAObjectIt
        if( ndf ){
                g_return_val_if_fail( FMA_IS_DESKTOP_FILE( ndf ), ret );
                uri = fma_desktop_file_get_key_file_uri( ndf );
-               if( nadp_utils_uri_delete( uri )){
+               if( fma_utils_uri_delete( uri )){
                        ret = IIO_PROVIDER_CODE_OK;
                }
                g_free( uri );


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