NAObjectAction

## NAObjectAction NAObjectAction — The Action Class Definition |

## Functions

#define | NA_TYPE_OBJECT_ACTION
#define | NA_OBJECT_ACTION()
#define | NA_IS_OBJECT_ACTION()
NAObjectAction * | na_object_action_new ()
NAObjectAction * | na_object_action_new_with_profile ()
NAObjectAction * | na_object_action_new_with_defaults ()
gchar * | na_object_action_get_new_profile_name ()
void | na_object_action_attach_profile ()
void | na_object_action_set_last_version ()

## Properties

gboolean | na-factory-data-all-mimetypes | Read / Write
gpointer | na-factory-data-basenames | Read / Write
gpointer | na-factory-data-capabilitites | Read / Write
gchar * | na-factory-data-description | Read / Write
gboolean | na-factory-data-enabled | Read / Write
gpointer | na-factory-data-folders | Read / Write
gchar * | na-factory-data-icon | Read / Write
gchar * | na-factory-data-id | Read / Write
gpointer | na-factory-data-items | Read / Write
gpointer | na-factory-data-items-slist | Read / Write
guint | na-factory-data-iversion | Read / Write
gchar * | na-factory-data-label | Read / Write
guint | na-factory-data-last-allocated | Read / Write
gboolean | na-factory-data-matchcase | Read / Write
gpointer | na-factory-data-mimetypes | Read / Write
gpointer | na-factory-data-not-show-in | Read / Write
gpointer | na-factory-data-only-show-in | Read / Write
gpointer | na-factory-data-parent | Read / Write
gpointer | na-factory-data-provider | Read / Write
gpointer | na-factory-data-provider-data | Read / Write
gboolean | na-factory-data-readonly | Read / Write
gpointer | na-factory-data-schemes | Read / Write
gchar * | na-factory-data-selection-count | Read / Write
gchar * | na-factory-data-shortcut | Read / Write
gchar * | na-factory-data-show-if-registered | Read / Write
gchar * | na-factory-data-show-if-running | Read / Write
gchar * | na-factory-data-show-if-true | Read / Write
gboolean | na-factory-data-target-location | Read / Write
gboolean | na-factory-data-target-selection | Read / Write
gboolean | na-factory-data-target-toolbar | Read / Write
gchar * | na-factory-data-toolbar-label | Read / Write
gboolean | na-factory-data-toolbar-same-label | Read / Write
gchar * | na-factory-data-tooltip | Read / Write
gchar * | na-factory-data-try-exec | Read / Write
gchar * | na-factory-data-version | Read / Write

## Types and Values

| NAObjectAction

## Object Hierarchy

        GObject
        ╰── NAObject
            ╰── NAObjectId
                ╰── NAObjectItem
                    ╰── NAObjectAction

## Implemented Interfaces

NAObjectAction implements NAIDuplicable, NAIContext and NAIFactoryObject.

## Includes

    #include <caja-actions/na-object-action.h>

## Description

This is the class which maintains data and properties of a Caja-Actions™ action.

Edition status. As a particular rule for a NAObjectItem -derived class, a NAObjectAction is considered modified as soon as any of its profiles has been modified itself (because they are saved as a whole).

## Functions

### NA_TYPE_OBJECT_ACTION

    #define NA_TYPE_OBJECT_ACTION                ( na_object_action_get_type())

### NA_OBJECT_ACTION()

    #define NA_OBJECT_ACTION( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_TYPE_OBJECT_ACTION, NAObjectAction ))

### NA_IS_OBJECT_ACTION()

    #define NA_IS_OBJECT_ACTION( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_TYPE_OBJECT_ACTION ))

### na_object_action_new ()

    NAObjectAction *
    na_object_action_new (void);

Allocates a new NAObjectAction object.

The new NAObjectAction object is initialized with suitable default values, but without any profile.

#### Returns

the newly allocated NAObjectAction object.

Since 2.30

### na_object_action_new_with_profile ()

    NAObjectAction *
    na_object_action_new_with_profile (void);

Allocates a new NAObjectAction object along with a default profile.

#### Returns

the newly allocated NAObjectAction action.

Since 2.30

### na_object_action_new_with_defaults ()

    NAObjectAction *
    na_object_action_new_with_defaults (void);

Allocates a new NAObjectAction object along with a default profile. These two objects have suitable default values.

#### Returns

the newly allocated NAObjectAction action.

Since 2.30

### na_object_action_get_new_profile_name ()

    gchar *
    na_object_action_get_new_profile_name (const NAObjectAction *action);

Returns a name suitable as a new profile name.

The search is made by iterating over the standard profile name prefix : basically, we increment a counter until finding a name which is not yet allocated. The provided name is so only suitable for the specified `action` .

When inserting a list of profiles in the action, we iter first for new names, before actually do the insertion. We so keep the last allocated name to avoid to allocate the same one twice.

#### Parameters

action | the NAObjectAction object which will receive a new profile. |

#### Returns

a newly allocated profile name, which should be `g_free()` by the caller.

Since 2.30

### na_object_action_attach_profile ()

    void
    na_object_action_attach_profile (NAObjectAction *action,
                                     NAObjectProfile *profile);

Adds a profile at the end of the list of profiles.

#### Parameters

action | the NAObjectAction action to which the profile will be attached. |
profile | the NAObjectProfile profile to be attached to `action` . |

Since 2.30

### na_object_action_set_last_version ()

    void
    na_object_action_set_last_version (NAObjectAction *action);

Set the version number of the `action` to the last one.

#### Parameters

action | the NAObjectAction action to update. |

Since 2.30

## Types and Values

### NAObjectAction

    typedef struct _NAObjectAction NAObjectAction;

## Property Details

### The `“na-factory-data-all-mimetypes”` property

      “na-factory-data-all-mimetypes” gboolean

The generic wildcard may be coded as '*', or '*/*' or 'all' or 'all/*' or 'all/all'. In each case, we will try to spend as less time as possible to check selection mimetypes.

Flags: Read / Write

Default value: TRUE

### The `“na-factory-data-basenames”` property

      “na-factory-data-basenames” gpointer

Flags: Read / Write

### The `“na-factory-data-capabilitites”` property

      “na-factory-data-capabilitites” gpointer

Flags: Read / Write

### The `“na-factory-data-description”` property

      “na-factory-data-description” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-enabled”` property

      “na-factory-data-enabled”  gboolean

Flags: Read / Write

Default value: TRUE

### The `“na-factory-data-folders”` property

      “na-factory-data-folders”  gpointer

Flags: Read / Write

### The `“na-factory-data-icon”` property

      “na-factory-data-icon”     gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-id”` property

      “na-factory-data-id”       gchar *

Internal identifier of the NAObjectId object. Historically a UUID used as a MateConf directory (thus ASCII, case insensitive), it is also the basename of the .desktop file (thus UTF-8, case sensitive).

Flags: Read / Write

Default value: ""

### The `“na-factory-data-items”` property

      “na-factory-data-items”    gpointer

List of subitems objects.

Flags: Read / Write

### The `“na-factory-data-items-slist”` property

      “na-factory-data-items-slist” gpointer

Flags: Read / Write

### The `“na-factory-data-iversion”` property

      “na-factory-data-iversion” guint

The version of the configuration format that will be used to manage backward compatibility.

Flags: Read / Write

Default value: 3

### The `“na-factory-data-label”` property

      “na-factory-data-label”    gchar *

Flags: Read / Write

Default value: "Empty label"

### The `“na-factory-data-last-allocated”` property

      “na-factory-data-last-allocated” guint

Last allocated profile number in na_object_action_get_new_profile_name(), reset to zero when saving the action.

Flags: Read / Write

Default value: 0

### The `“na-factory-data-matchcase”` property

      “na-factory-data-matchcase” gboolean

Flags: Read / Write

Default value: TRUE

### The `“na-factory-data-mimetypes”` property

      “na-factory-data-mimetypes” gpointer

Flags: Read / Write

### The `“na-factory-data-not-show-in”` property

      “na-factory-data-not-show-in” gpointer

Defaults to none.

Flags: Read / Write

### The `“na-factory-data-only-show-in”` property

      “na-factory-data-only-show-in” gpointer

Defaults to all.

Flags: Read / Write

### The `“na-factory-data-parent”` property

      “na-factory-data-parent”   gpointer

The NAObjectItem which is the parent of this object.

Flags: Read / Write

### The `“na-factory-data-provider”` property

      “na-factory-data-provider” gpointer

A pointer to the NAIOProvider object.

Flags: Read / Write

### The `“na-factory-data-provider-data”` property

      “na-factory-data-provider-data” gpointer

A pointer to some NAIOProvider specific data.

Flags: Read / Write

### The `“na-factory-data-readonly”` property

      “na-factory-data-readonly” gboolean

Is the item only readable ? This is an intrinsic property, dynamically set when the item is unserialized. This property being FALSE doesn't mean that the item will actually be updatable, as this also depend of parameters set by user and administrator. Also, a property initially set to FALSE when first unserializing may be set toTRUE if an eccor occurs on a later write operation.

Flags: Read / Write

Default value: FALSE

### The `“na-factory-data-schemes”` property

      “na-factory-data-schemes”  gpointer

Flags: Read / Write

### The `“na-factory-data-selection-count”` property

      “na-factory-data-selection-count” gchar *

Flags: Read / Write

Default value: ">0"

### The `“na-factory-data-shortcut”` property

      “na-factory-data-shortcut” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-show-if-registered”` property

      “na-factory-data-show-if-registered” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-show-if-running”` property

      “na-factory-data-show-if-running” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-show-if-true”` property

      “na-factory-data-show-if-true” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-target-location”` property

      “na-factory-data-target-location” gboolean

Flags: Read / Write

Default value: FALSE

### The `“na-factory-data-target-selection”` property

      “na-factory-data-target-selection” gboolean

Flags: Read / Write

Default value: TRUE

### The `“na-factory-data-target-toolbar”` property

      “na-factory-data-target-toolbar” gboolean

Flags: Read / Write

Default value: FALSE

### The `“na-factory-data-toolbar-label”` property

      “na-factory-data-toolbar-label” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-toolbar-same-label”` property

      “na-factory-data-toolbar-same-label” gboolean

Does the toolbar label is the same than the main one ?.

Flags: Read / Write

Default value: TRUE

### The `“na-factory-data-tooltip”` property

      “na-factory-data-tooltip”  gchar *

The tooltip of the menu item that will appear in the file manager statusbar when the user points to the file manager context menu item with his/her mouse.

Flags: Read / Write

Default value: ""

### The `“na-factory-data-try-exec”` property

      “na-factory-data-try-exec” gchar *

Flags: Read / Write

Default value: ""

### The `“na-factory-data-version”` property

      “na-factory-data-version”  gchar *

The version of the configuration format that will be used to manage backward compatibility.

Flags: Read / Write

Default value: ""