[nautilus-actions] NATokens class is renamed to FMATokens



commit a23b1aebeaff0d22db11e5df9eedcea41b6f1a85
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Sep 8 12:40:00 2015 +0200

    NATokens class is renamed to FMATokens

 src/core/Makefile.am                   |    4 +-
 src/core/{na-tokens.c => fma-tokens.c} |  122 ++++++++++++++++----------------
 src/core/{na-tokens.h => fma-tokens.h} |   58 ++++++++--------
 src/nact/nact-icommand-tab.c           |   12 ++--
 src/nact/nact-preferences-editor.c     |    4 +-
 src/plugin-menu/nautilus-actions.c     |   52 +++++++-------
 src/utils/nautilus-actions-run.c       |    8 +-
 7 files changed, 130 insertions(+), 130 deletions(-)
---
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 9ccb743..95a22c8 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -118,8 +118,8 @@ libna_core_la_SOURCES = \
        fma-settings.c                                                                          \
        fma-settings.h                                                                          \
        fma-timeout.c                                                                           \
-       na-tokens.c                                                                                     \
-       na-tokens.h                                                                                     \
+       fma-tokens.c                                                                                    \
+       fma-tokens.h                                                                                    \
        na-updater.c                                                                            \
        na-updater.h                                                                            \
        $(BUILT_SOURCES)                                                                        \
diff --git a/src/core/na-tokens.c b/src/core/fma-tokens.c
similarity index 89%
rename from src/core/na-tokens.c
rename to src/core/fma-tokens.c
index e403960..f9f6e45 100644
--- a/src/core/na-tokens.c
+++ b/src/core/fma-tokens.c
@@ -42,17 +42,17 @@
 #include "fma-gnome-vfs-uri.h"
 #include "fma-selected-info.h"
 #include "fma-settings.h"
-#include "na-tokens.h"
+#include "fma-tokens.h"
 
 /* private class data
  */
-struct _NATokensClassPrivate {
+struct _FMATokensClassPrivate {
        void *empty;                                            /* so that gcc -pedantic is happy */
 };
 
 /* private instance data
  */
-struct _NATokensPrivate {
+struct _FMATokensPrivate {
        gboolean dispose_has_run;
        guint    count;
        GSList  *uris;
@@ -81,7 +81,7 @@ typedef struct {
 static GObjectClass *st_parent_class = NULL;
 
 static GType     register_type( void );
-static void      class_init( NATokensClass *klass );
+static void      class_init( FMATokensClass *klass );
 static void      instance_init( GTypeInstance *instance, gpointer klass );
 static void      instance_dispose( GObject *object );
 static void      instance_finalize( GObject *object );
@@ -89,18 +89,18 @@ static void      instance_finalize( GObject *object );
 static void      child_watch_fn( GPid pid, gint status, ChildStr *child_str );
 static void      display_output( const gchar *command, int fd_stdout, int fd_stderr );
 static gchar    *display_output_get_content( int fd );
-static void      execute_action_command( gchar *command, const FMAObjectProfile *profile, const NATokens 
*tokens );
+static void      execute_action_command( gchar *command, const FMAObjectProfile *profile, const FMATokens 
*tokens );
 static gchar    *get_command_execution_display_output( const gchar *command );
 static gchar    *get_command_execution_embedded( const gchar *command );
 static gchar    *get_command_execution_normal( const gchar *command );
 static gchar    *get_command_execution_terminal( const gchar *command );
-static gboolean  is_singular_exec( const NATokens *tokens, const gchar *exec );
-static gchar    *parse_singular( const NATokens *tokens, const gchar *input, guint i, gboolean utf8, 
gboolean quoted );
+static gboolean  is_singular_exec( const FMATokens *tokens, const gchar *exec );
+static gchar    *parse_singular( const FMATokens *tokens, const gchar *input, guint i, gboolean utf8, 
gboolean quoted );
 static GString  *quote_string( GString *input, const gchar *name, gboolean quoted );
 static GString  *quote_string_list( GString *input, GSList *names, gboolean quoted );
 
 GType
-na_tokens_get_type( void )
+fma_tokens_get_type( void )
 {
        static GType object_type = 0;
 
@@ -114,32 +114,32 @@ na_tokens_get_type( void )
 static GType
 register_type( void )
 {
-       static const gchar *thisfn = "na_tokens_register_type";
+       static const gchar *thisfn = "fma_tokens_register_type";
        GType type;
 
        static GTypeInfo info = {
-               sizeof( NATokensClass ),
+               sizeof( FMATokensClass ),
                ( GBaseInitFunc ) NULL,
                ( GBaseFinalizeFunc ) NULL,
                ( GClassInitFunc ) class_init,
                NULL,
                NULL,
-               sizeof( NATokens ),
+               sizeof( FMATokens ),
                0,
                ( GInstanceInitFunc ) instance_init
        };
 
        g_debug( "%s", thisfn );
 
-       type = g_type_register_static( G_TYPE_OBJECT, "NATokens", &info, 0 );
+       type = g_type_register_static( G_TYPE_OBJECT, "FMATokens", &info, 0 );
 
        return( type );
 }
 
 static void
-class_init( NATokensClass *klass )
+class_init( FMATokensClass *klass )
 {
-       static const gchar *thisfn = "na_tokens_class_init";
+       static const gchar *thisfn = "fma_tokens_class_init";
        GObjectClass *object_class;
 
        g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -150,23 +150,23 @@ class_init( NATokensClass *klass )
        object_class->dispose = instance_dispose;
        object_class->finalize = instance_finalize;
 
-       klass->private = g_new0( NATokensClassPrivate, 1 );
+       klass->private = g_new0( FMATokensClassPrivate, 1 );
 }
 
 static void
 instance_init( GTypeInstance *instance, gpointer klass )
 {
-       static const gchar *thisfn = "na_tokens_instance_init";
-       NATokens *self;
+       static const gchar *thisfn = "fma_tokens_instance_init";
+       FMATokens *self;
 
-       g_return_if_fail( NA_IS_TOKENS( instance ));
+       g_return_if_fail( FMA_IS_TOKENS( instance ));
 
        g_debug( "%s: instance=%p (%s), klass=%p",
                        thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
 
-       self = NA_TOKENS( instance );
+       self = FMA_TOKENS( instance );
 
-       self->private = g_new0( NATokensPrivate, 1 );
+       self->private = g_new0( FMATokensPrivate, 1 );
 
        self->private->uris = NULL;
        self->private->filenames = NULL;
@@ -186,12 +186,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
 static void
 instance_dispose( GObject *object )
 {
-       static const gchar *thisfn = "na_tokens_instance_dispose";
-       NATokens *self;
+       static const gchar *thisfn = "fma_tokens_instance_dispose";
+       FMATokens *self;
 
-       g_return_if_fail( NA_IS_TOKENS( object ));
+       g_return_if_fail( FMA_IS_TOKENS( object ));
 
-       self = NA_TOKENS( object );
+       self = FMA_TOKENS( object );
 
        if( !self->private->dispose_has_run ){
 
@@ -208,14 +208,14 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
-       static const gchar *thisfn = "na_tokens_instance_finalize";
-       NATokens *self;
+       static const gchar *thisfn = "fma_tokens_instance_finalize";
+       FMATokens *self;
 
-       g_return_if_fail( NA_IS_TOKENS( object ));
+       g_return_if_fail( FMA_IS_TOKENS( object ));
 
        g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 
-       self = NA_TOKENS( object );
+       self = FMA_TOKENS( object );
 
        g_free( self->private->scheme );
        g_free( self->private->username );
@@ -237,17 +237,17 @@ instance_finalize( GObject *object )
 }
 
 /*
- * na_tokens_new_for_example:
+ * fma_tokens_new_for_example:
  *
- * Returns: a new #NATokens object initialized with fake values for two
+ * Returns: a new #FMATokens object initialized with fake values for two
  * regular files, in order to be used as an example of an expanded command
  * line.
  */
-NATokens *
-na_tokens_new_for_example( void )
+FMATokens *
+fma_tokens_new_for_example( void )
 {
-       static const gchar *thisfn = "na_tokens_new_for_example";
-       NATokens *tokens;
+       static const gchar *thisfn = "fma_tokens_new_for_example";
+       FMATokens *tokens;
        const gchar *ex_uri1 = _( "file:///path/to/file1.mid" );
        const gchar *ex_uri2 = _( "file:///path/to/file2.jpeg" );
        const gchar *ex_mimetype1 = _( "audio/x-midi" );
@@ -262,7 +262,7 @@ na_tokens_new_for_example( void )
 
        g_debug( "%s:", thisfn );
 
-       tokens = g_object_new( NA_TYPE_TOKENS, NULL );
+       tokens = g_object_new( FMA_TYPE_TOKENS, NULL );
        first = TRUE;
        tokens->private->count = 2;
 
@@ -301,16 +301,16 @@ na_tokens_new_for_example( void )
 }
 
 /*
- * na_tokens_new_from_selection:
+ * fma_tokens_new_from_selection:
  * @selection: a #GList list of #FMASelectedInfo objects.
  *
- * Returns: a new #NATokens object which holds all possible tokens.
+ * Returns: a new #FMATokens object which holds all possible tokens.
  */
-NATokens *
-na_tokens_new_from_selection( GList *selection )
+FMATokens *
+fma_tokens_new_from_selection( GList *selection )
 {
-       static const gchar *thisfn = "na_tokens_new_from_selection";
-       NATokens *tokens;
+       static const gchar *thisfn = "fma_tokens_new_from_selection";
+       FMATokens *tokens;
        GList *it;
        gchar *uri, *filename, *basedir, *basename, *bname_woext, *ext, *mimetype;
        gboolean first;
@@ -318,7 +318,7 @@ na_tokens_new_from_selection( GList *selection )
        g_debug( "%s: selection=%p (count=%d)", thisfn, ( void * ) selection, g_list_length( selection ));
 
        first = TRUE;
-       tokens = g_object_new( NA_TYPE_TOKENS, NULL );
+       tokens = g_object_new( FMA_TYPE_TOKENS, NULL );
 
        tokens->private->count = g_list_length( selection );
 
@@ -352,8 +352,8 @@ na_tokens_new_from_selection( GList *selection )
 }
 
 /*
- * na_tokens_parse_for_display:
- * @tokens: a #NATokens object.
+ * fma_tokens_parse_for_display:
+ * @tokens: a #FMATokens object.
  * @string: the input string, may or may not contain tokens.
  * @utf8: whether the @input string is UTF-8 encoded, or a standard ASCII string.
  *
@@ -366,20 +366,20 @@ na_tokens_new_from_selection( GList *selection )
  * allocated string which should be g_free() by the caller.
  */
 gchar *
-na_tokens_parse_for_display( const NATokens *tokens, const gchar *string, gboolean utf8 )
+fma_tokens_parse_for_display( const FMATokens *tokens, const gchar *string, gboolean utf8 )
 {
        return( parse_singular( tokens, string, 0, utf8, FALSE ));
 }
 
 /*
- * na_tokens_execute_action:
- * @tokens: a #NATokens object.
+ * fma_tokens_execute_action:
+ * @tokens: a #FMATokens object.
  * @profile: the #FMAObjectProfile to be executed.
  *
  * Execute the given action, regarding the context described by @tokens.
  */
 void
-na_tokens_execute_action( const NATokens *tokens, const FMAObjectProfile *profile )
+fma_tokens_execute_action( const FMATokens *tokens, const FMAObjectProfile *profile )
 {
        gchar *path, *parameters, *exec;
        gboolean singular;
@@ -413,7 +413,7 @@ na_tokens_execute_action( const NATokens *tokens, const FMAObjectProfile *profil
 static void
 child_watch_fn( GPid pid, gint status, ChildStr *child_str )
 {
-       static const gchar *thisfn = "na_tokens_child_watch_fn";
+       static const gchar *thisfn = "fma_tokens_child_watch_fn";
 
        g_debug( "%s: pid=%u, status=%d", thisfn, ( guint ) pid, status );
        g_spawn_close_pid( pid );
@@ -453,7 +453,7 @@ display_output( const gchar *command, int fd_stdout, int fd_stderr )
 static gchar *
 display_output_get_content( int fd )
 {
-       static const gchar *thisfn = "na_tokens_display_output_get_content";
+       static const gchar *thisfn = "fma_tokens_display_output_get_content";
        GInputStream *stream;
        GString *string;
        gchar buf[1024];
@@ -492,7 +492,7 @@ display_output_get_content( int fd )
  * - DisplayOutput: execute in a shell
  */
 static void
-execute_action_command( gchar *command, const FMAObjectProfile *profile, const NATokens *tokens )
+execute_action_command( gchar *command, const FMAObjectProfile *profile, const FMATokens *tokens )
 {
        static const gchar *thisfn = "nautilus_actions_execute_action_command";
        GError *error;
@@ -602,7 +602,7 @@ static gchar *
 get_command_execution_display_output( const gchar *command )
 {
        static const gchar *bin_sh = "/bin/sh -c COMMAND";
-       return( na_tokens_command_for_terminal( bin_sh, command ));
+       return( fma_tokens_command_for_terminal( bin_sh, command ));
 }
 
 static gchar *
@@ -624,14 +624,14 @@ get_command_execution_terminal( const gchar *command )
        gchar *pattern;
 
        pattern = fma_settings_get_string( IPREFS_TERMINAL_PATTERN, NULL, NULL );
-       run_command = na_tokens_command_for_terminal( pattern, command );
+       run_command = fma_tokens_command_for_terminal( pattern, command );
        g_free( pattern );
 
        return( run_command );
 }
 
 /**
- * na_tokens_command_for_terminal:
+ * fma_tokens_command_for_terminal:
  * @pattern: the command pattern; should include a 'COMMAND' keyword
  * @command: the command to be actually run in the terminal
  *
@@ -639,7 +639,7 @@ get_command_execution_terminal( const gchar *command )
  * be g_free() by the caller.
  */
 gchar *
-na_tokens_command_for_terminal( const gchar *pattern, const gchar *command )
+fma_tokens_command_for_terminal( const gchar *pattern, const gchar *command )
 {
        gchar *run_command;
        gchar *quoted;
@@ -657,15 +657,15 @@ na_tokens_command_for_terminal( const gchar *pattern, const gchar *command )
 }
 
 /*
- * na_tokens_is_singular_exec:
- * @tokens: the current #NATokens object.
+ * fma_tokens_is_singular_exec:
+ * @tokens: the current #FMATokens object.
  * @exec: the to be executed command-line before having been parsed
  *
  * Returns: %TRUE if the first relevant parameter found in @exec
  * command-line is of singular form, %FALSE else.
  */
 static gboolean
-is_singular_exec( const NATokens *tokens, const gchar *exec )
+is_singular_exec( const FMATokens *tokens, const gchar *exec )
 {
        gboolean singular;
        gboolean found;
@@ -720,7 +720,7 @@ is_singular_exec( const NATokens *tokens, const gchar *exec )
 
 /*
  * parse_singular:
- * @tokens: a #NATokens object.
+ * @tokens: a #FMATokens object.
  * @input: the input string, may or may not contain tokens.
  * @i: the number of the iteration in a multiple selection, starting with zero.
  * @utf8: whether the @input string is UTF-8 encoded, or a standard ASCII
@@ -736,9 +736,9 @@ is_singular_exec( const NATokens *tokens, const gchar *exec )
  * The returned #GSList should be fma_core_utils_slist_free() by the caller.
  */
 static gchar *
-parse_singular( const NATokens *tokens, const gchar *input, guint i, gboolean utf8, gboolean quoted )
+parse_singular( const FMATokens *tokens, const gchar *input, guint i, gboolean utf8, gboolean quoted )
 {
-       static const gchar *thisfn = "na_tokens_parse_singular";
+       static const gchar *thisfn = "fma_tokens_parse_singular";
        GString *output;
        gchar *iter, *prev_iter;
        const gchar *nth;
diff --git a/src/core/na-tokens.h b/src/core/fma-tokens.h
similarity index 63%
rename from src/core/na-tokens.h
rename to src/core/fma-tokens.h
index 96d6f44..32e3868 100644
--- a/src/core/na-tokens.h
+++ b/src/core/fma-tokens.h
@@ -27,14 +27,14 @@
  *   ... and many others (see AUTHORS)
  */
 
-#ifndef __CORE_NA_TOKENS_H__
-#define __CORE_NA_TOKENS_H__
+#ifndef __CORE_FMA_TOKENS_H__
+#define __CORE_FMA_TOKENS_H__
 
-/* @title: NATokens
- * @short_description: The #NATokens Class Definition
- * @include: core/na-tokens.h
+/* @title: FMATokens
+ * @short_description: The #FMATokens Class Definition
+ * @include: core/fma-tokens.h
  *
- * The #NATokens class manages the tokens which are to be replaced with
+ * The #FMATokens class manages the tokens which are to be replaced with
  * elements of the current selection at runtime.
  *
  * Note that until v2.30, tokens were parsed against selection list only
@@ -48,8 +48,8 @@
  * Adding a parameter requires updating of:
  * - doc/nact/C/figures/nact-legend.png screenshot
  * - doc/nact/C/nact-execution.xml "Multiple execution" paragraph
- * - src/core/na-tokens.c::is_singular_exec() function
- * - src/core/na-tokens.c::parse_singular() function
+ * - src/core/fma-tokens.c::is_singular_exec() function
+ * - src/core/fma-tokens.c::parse_singular() function
  * - src/nact/file-manager-actions-config-tool.ui:LegendDialog labels
  * - src/core/fma-object-profile-factory.c:FMAFO_DATA_PARAMETERS comment
  *
@@ -83,41 +83,41 @@
 
 G_BEGIN_DECLS
 
-#define NA_TYPE_TOKENS                ( na_tokens_get_type())
-#define NA_TOKENS( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_TYPE_TOKENS, NATokens ))
-#define NA_TOKENS_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( klass, NA_TYPE_TOKENS, NATokensClass ))
-#define NA_IS_TOKENS( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_TYPE_TOKENS ))
-#define NA_IS_TOKENS_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NA_TYPE_TOKENS ))
-#define NA_TOKENS_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NA_TYPE_TOKENS, NATokensClass 
))
+#define FMA_TYPE_TOKENS                ( fma_tokens_get_type())
+#define FMA_TOKENS( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_TOKENS, FMATokens ))
+#define FMA_TOKENS_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_TOKENS, FMATokensClass ))
+#define FMA_IS_TOKENS( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_TOKENS ))
+#define FMA_IS_TOKENS_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_TOKENS ))
+#define FMA_TOKENS_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_TOKENS, 
FMATokensClass ))
 
-typedef struct _NATokensPrivate       NATokensPrivate;
+typedef struct _FMATokensPrivate       FMATokensPrivate;
 
 typedef struct {
        /*< private >*/
-       GObject          parent;
-       NATokensPrivate *private;
+       GObject           parent;
+       FMATokensPrivate *private;
 }
-       NATokens;
+       FMATokens;
 
-typedef struct _NATokensClassPrivate  NATokensClassPrivate;
+typedef struct _FMATokensClassPrivate  FMATokensClassPrivate;
 
 typedef struct {
        /*< private >*/
-       GObjectClass          parent;
-       NATokensClassPrivate *private;
+       GObjectClass           parent;
+       FMATokensClassPrivate *private;
 }
-       NATokensClass;
+       FMATokensClass;
 
-GType     na_tokens_get_type            ( void );
+GType      fma_tokens_get_type            ( void );
 
-NATokens *na_tokens_new_for_example     ( void );
-NATokens *na_tokens_new_from_selection  ( GList *selection );
+FMATokens *fma_tokens_new_for_example     ( void );
+FMATokens *fma_tokens_new_from_selection  ( GList *selection );
 
-gchar    *na_tokens_parse_for_display   ( const NATokens *tokens, const gchar *string, gboolean utf8 );
-void      na_tokens_execute_action      ( const NATokens *tokens, const FMAObjectProfile *profile );
+gchar     *fma_tokens_parse_for_display   ( const FMATokens *tokens, const gchar *string, gboolean utf8 );
+void       fma_tokens_execute_action      ( const FMATokens *tokens, const FMAObjectProfile *profile );
 
-gchar    *na_tokens_command_for_terminal( const gchar *pattern, const gchar *command );
+gchar     *fma_tokens_command_for_terminal( const gchar *pattern, const gchar *command );
 
 G_END_DECLS
 
-#endif /* __CORE_NA_TOKENS_H__ */
+#endif /* __CORE_FMA_TOKENS_H__ */
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 7676808..a8e6039 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -39,7 +39,7 @@
 
 #include "core/fma-factory-object.h"
 #include "core/fma-gtk-utils.h"
-#include "core/na-tokens.h"
+#include "core/fma-tokens.h"
 
 #include "nact-application.h"
 #include "nact-statusbar.h"
@@ -63,7 +63,7 @@ struct _NactICommandTabInterfacePrivate {
  */
 typedef struct {
        gboolean   on_selection_change;
-       NATokens  *tokens;
+       FMATokens  *tokens;
        GtkWindow *legend;
 }
        ICommandData;
@@ -277,13 +277,13 @@ initialize_window( NactICommandTab *instance )
        g_signal_connect( instance,
                        MAIN_SIGNAL_ITEM_UPDATED, G_CALLBACK( on_main_item_updated ), NULL );
 
-       /* allocate a static fake NATokens object which will be used to build
+       /* allocate a static fake FMATokens object which will be used to build
         * the example label - this object will be g_object_unref() on instance
         * finalization
         */
        data = get_icommand_data( instance );
        if( !data->tokens ){
-               data->tokens = na_tokens_new_for_example();
+               data->tokens = fma_tokens_new_for_example();
                g_debug( "%s: data=%p, tokens=%p", thisfn, ( void * ) data, ( void * ) data->tokens );
        }
 }
@@ -611,7 +611,7 @@ on_wdir_changed( GtkEntry *entry, NactICommandTab *instance )
 }
 
 /*
- * See core/na-tokens.c for valid parameters
+ * See core/fma-tokens.c for valid parameters
  */
 static gchar *
 parse_parameters( NactICommandTab *instance )
@@ -627,7 +627,7 @@ parse_parameters( NactICommandTab *instance )
        exec = g_strdup_printf( "%s %s", command, param_template );
        g_debug( "%s: data=%p, tokens=%p, exec=%s",
                        thisfn, ( void * ) data, ( void * ) data->tokens, exec );
-       returned = na_tokens_parse_for_display( data->tokens, exec, FALSE );
+       returned = fma_tokens_parse_for_display( data->tokens, exec, FALSE );
        g_free( exec );
 
        return( returned );
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index ae19cac..5817f86 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -44,7 +44,7 @@
 #include <core/fma-importer.h>
 #include <core/fma-ioptions-list.h>
 #include <core/fma-iprefs.h>
-#include <core/na-tokens.h>
+#include <core/fma-tokens.h>
 
 #include "nact-application.h"
 #include "base-gtk-utils.h"
@@ -810,7 +810,7 @@ terminal_pattern_on_changed( GtkEntry *entry, NactPreferencesEditor *editor )
                editor->private->terminal_pattern = g_strdup( gtk_entry_get_text( entry ));
 
                example_widget = base_window_get_widget( BASE_WINDOW( editor ), "TerminalPrefixExample" );
-               example_label = na_tokens_command_for_terminal( editor->private->terminal_pattern, "ls -l" );
+               example_label = fma_tokens_command_for_terminal( editor->private->terminal_pattern, "ls -l" );
 
                /* i18n: command-line example: Ex.: gnome-terminal -c "ls -l" */
                example_markup = g_markup_printf_escaped(
diff --git a/src/plugin-menu/nautilus-actions.c b/src/plugin-menu/nautilus-actions.c
index f39365a..75dd8ed 100644
--- a/src/plugin-menu/nautilus-actions.c
+++ b/src/plugin-menu/nautilus-actions.c
@@ -46,7 +46,7 @@
 #include <core/fma-pivot.h>
 #include <core/fma-about.h>
 #include <core/fma-selected-info.h>
-#include <core/na-tokens.h>
+#include <core/fma-tokens.h>
 
 #include "nautilus-actions.h"
 
@@ -85,11 +85,11 @@ static GList            *menu_provider_get_toolbar_items( NautilusMenuProvider *
 #endif
 
 static GList            *build_nautilus_menu( NautilusActions *plugin, guint target, GList *selection );
-static GList            *build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens 
*tokens );
-static FMAObjectItem     *expand_tokens_item( const FMAObjectItem *item, NATokens *tokens );
-static void              expand_tokens_context( FMAIContext *context, NATokens *tokens );
+static GList            *build_nautilus_menu_rec( GList *tree, guint target, GList *selection, FMATokens 
*tokens );
+static FMAObjectItem     *expand_tokens_item( const FMAObjectItem *item, FMATokens *tokens );
+static void              expand_tokens_context( FMAIContext *context, FMATokens *tokens );
 static FMAObjectProfile  *get_candidate_profile( FMAObjectAction *action, guint target, GList *files );
-static NautilusMenuItem *create_item_from_profile( FMAObjectProfile *profile, guint target, GList *files, 
NATokens *tokens );
+static NautilusMenuItem *create_item_from_profile( FMAObjectProfile *profile, guint target, GList *files, 
FMATokens *tokens );
 static NautilusMenuItem *create_item_from_menu( FMAObjectMenu *menu, GList *subitems, guint target );
 static NautilusMenuItem *create_menu_item( const FMAObjectItem *item, guint target );
 static void              weak_notify_menu_item( void *user_data /* =NULL */, NautilusMenuItem *item );
@@ -490,21 +490,21 @@ build_nautilus_menu( NautilusActions *plugin, guint target, GList *selection )
 {
        static const gchar *thisfn = "nautilus_actions_build_nautilus_menu";
        GList *nautilus_menu;
-       NATokens *tokens;
+       FMATokens *tokens;
        GList *tree;
        gboolean items_add_about_item;
        gboolean items_create_root_menu;
 
        g_return_val_if_fail( FMA_IS_PIVOT( plugin->private->pivot ), NULL );
 
-       tokens = na_tokens_new_from_selection( selection );
+       tokens = fma_tokens_new_from_selection( selection );
 
        tree = fma_pivot_get_items( plugin->private->pivot );
        g_debug( "%s: tree=%p, count=%d", thisfn, ( void * ) tree, g_list_length( tree ));
 
        nautilus_menu = build_nautilus_menu_rec( tree, target, selection, tokens );
 
-       /* the NATokens object has been attached (and reffed) by each found
+       /* the FMATokens object has been attached (and reffed) by each found
         * candidate profile, so it will be actually finalized only on actual
         * NautilusMenu finalization itself
         */
@@ -527,7 +527,7 @@ build_nautilus_menu( NautilusActions *plugin, guint target, GList *selection )
 }
 
 static GList *
-build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *tokens )
+build_nautilus_menu_rec( GList *tree, guint target, GList *selection, FMATokens *tokens )
 {
        static const gchar *thisfn = "nautilus_actions_build_nautilus_menu_rec";
        GList *nautilus_menu;
@@ -614,7 +614,7 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
 /*
  * expand_tokens_item:
  * @item: a FMAObjectItem read from the FMAPivot.
- * @tokens: the NATokens object which holds current selection data
+ * @tokens: the FMATokens object which holds current selection data
  *  (uris, basenames, mimetypes, etc.)
  *
  * Updates the @item, replacing parameters with the corresponding token.
@@ -626,7 +626,7 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
  * Returns: a duplicated object which has to be g_object_unref() by the caller.
  */
 static FMAObjectItem *
-expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
+expand_tokens_item( const FMAObjectItem *src, FMATokens *tokens )
 {
        gchar *old, *new;
        GSList *subitems_slist, *its, *new_slist;
@@ -639,26 +639,26 @@ expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
         * plus the toolbar label if this is an action
         */
        old = fma_object_get_label( item );
-       new = na_tokens_parse_for_display( tokens, old, TRUE );
+       new = fma_tokens_parse_for_display( tokens, old, TRUE );
        fma_object_set_label( item, new );
        g_free( old );
        g_free( new );
 
        old = fma_object_get_tooltip( item );
-       new = na_tokens_parse_for_display( tokens, old, TRUE );
+       new = fma_tokens_parse_for_display( tokens, old, TRUE );
        fma_object_set_tooltip( item, new );
        g_free( old );
        g_free( new );
 
        old = fma_object_get_icon( item );
-       new = na_tokens_parse_for_display( tokens, old, TRUE );
+       new = fma_tokens_parse_for_display( tokens, old, TRUE );
        fma_object_set_icon( item, new );
        g_free( old );
        g_free( new );
 
        if( FMA_IS_OBJECT_ACTION( item )){
                old = fma_object_get_toolbar_label( item );
-               new = na_tokens_parse_for_display( tokens, old, TRUE );
+               new = fma_tokens_parse_for_display( tokens, old, TRUE );
                fma_object_set_toolbar_label( item, new );
                g_free( old );
                g_free( new );
@@ -677,7 +677,7 @@ expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
        for( its = subitems_slist ; its ; its = its->next ){
                old = ( gchar * ) its->data;
                if( old[0] == '[' && old[strlen(old)-1] == ']' ){
-                       new = na_tokens_parse_for_display( tokens, old, FALSE );
+                       new = fma_tokens_parse_for_display( tokens, old, FALSE );
                } else {
                        new = g_strdup( old );
                }
@@ -699,7 +699,7 @@ expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
                         * do not touch them here
                         */
                        old = fma_object_get_working_dir( it->data );
-                       new = na_tokens_parse_for_display( tokens, old, FALSE );
+                       new = fma_tokens_parse_for_display( tokens, old, FALSE );
                        fma_object_set_working_dir( it->data, new );
                        g_free( old );
                        g_free( new );
@@ -714,30 +714,30 @@ expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
 }
 
 static void
-expand_tokens_context( FMAIContext *context, NATokens *tokens )
+expand_tokens_context( FMAIContext *context, FMATokens *tokens )
 {
        gchar *old, *new;
 
        old = fma_object_get_try_exec( context );
-       new = na_tokens_parse_for_display( tokens, old, FALSE );
+       new = fma_tokens_parse_for_display( tokens, old, FALSE );
        fma_object_set_try_exec( context, new );
        g_free( old );
        g_free( new );
 
        old = fma_object_get_show_if_registered( context );
-       new = na_tokens_parse_for_display( tokens, old, FALSE );
+       new = fma_tokens_parse_for_display( tokens, old, FALSE );
        fma_object_set_show_if_registered( context, new );
        g_free( old );
        g_free( new );
 
        old = fma_object_get_show_if_true( context );
-       new = na_tokens_parse_for_display( tokens, old, FALSE );
+       new = fma_tokens_parse_for_display( tokens, old, FALSE );
        fma_object_set_show_if_true( context, new );
        g_free( old );
        g_free( new );
 
        old = fma_object_get_show_if_running( context );
-       new = na_tokens_parse_for_display( tokens, old, FALSE );
+       new = fma_tokens_parse_for_display( tokens, old, FALSE );
        fma_object_set_show_if_running( context, new );
        g_free( old );
        g_free( new );
@@ -776,7 +776,7 @@ get_candidate_profile( FMAObjectAction *action, guint target, GList *files )
 }
 
 static NautilusMenuItem *
-create_item_from_profile( FMAObjectProfile *profile, guint target, GList *files, NATokens *tokens )
+create_item_from_profile( FMAObjectProfile *profile, guint target, GList *files, FMATokens *tokens )
 {
        NautilusMenuItem *item;
        FMAObjectAction *action;
@@ -904,12 +904,12 @@ static void
 execute_action( NautilusMenuItem *item, FMAObjectProfile *profile )
 {
        static const gchar *thisfn = "nautilus_actions_execute_action";
-       NATokens *tokens;
+       FMATokens *tokens;
 
        g_debug( "%s: item=%p, profile=%p", thisfn, ( void * ) item, ( void * ) profile );
 
-       tokens = NA_TOKENS( g_object_get_data( G_OBJECT( item ), "file-manager-actions-tokens" ));
-       na_tokens_execute_action( tokens, profile );
+       tokens = FMA_TOKENS( g_object_get_data( G_OBJECT( item ), "file-manager-actions-tokens" ));
+       fma_tokens_execute_action( tokens, profile );
 }
 
 /*
diff --git a/src/utils/nautilus-actions-run.c b/src/utils/nautilus-actions-run.c
index b9bbc75..5c2c1cd 100644
--- a/src/utils/nautilus-actions-run.c
+++ b/src/utils/nautilus-actions-run.c
@@ -44,7 +44,7 @@
 #include <core/fma-gconf-migration.h>
 #include <core/fma-pivot.h>
 #include <core/fma-selected-info.h>
-#include <core/na-tokens.h>
+#include <core/fma-tokens.h>
 
 #include "console-utils.h"
 #include "nautilus-actions-run-bindings.h"
@@ -404,10 +404,10 @@ static void
 execute_action( FMAObjectAction *action, FMAObjectProfile *profile, GList *targets )
 {
        /*static const gchar *thisfn = "nautilus_action_run_execute_action";*/
-       NATokens *tokens;
+       FMATokens *tokens;
 
-       tokens = na_tokens_new_from_selection( targets );
-       na_tokens_execute_action( tokens, profile );
+       tokens = fma_tokens_new_from_selection( targets );
+       fma_tokens_execute_action( tokens, profile );
 }
 
 /*


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