FMAObjectAction

FMAObjectAction — The Action Class Definition

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── FMAObject
        ╰── FMAObjectId
            ╰── FMAObjectItem
                ╰── FMAObjectAction

Implemented Interfaces

FMAObjectAction implements FMAIDuplicable, FMAIContext and FMAIFactoryObject.

Includes

#include <filemanager-actions/fma-object-action.h>

Description

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

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

Functions

FMA_OBJECT_ACTION()

#define FMA_OBJECT_ACTION( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ACTION, FMAObjectAction ))

FMA_IS_OBJECT_ACTION()

#define FMA_IS_OBJECT_ACTION( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ACTION ))

fma_object_action_new ()

FMAObjectAction *
fma_object_action_new (void);

Allocates a new FMAObjectAction object.

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

Returns

the newly allocated FMAObjectAction object.

Since: 2.30


fma_object_action_new_with_profile ()

FMAObjectAction *
fma_object_action_new_with_profile (void);

Allocates a new FMAObjectAction object along with a default profile.

Returns

the newly allocated FMAObjectAction action.

Since: 2.30


fma_object_action_new_with_defaults ()

FMAObjectAction *
fma_object_action_new_with_defaults (void);

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

Returns

the newly allocated FMAObjectAction action.

Since: 2.30


fma_object_action_get_new_profile_name ()

gchar *
fma_object_action_get_new_profile_name
                               (const FMAObjectAction *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 FMAObjectAction object which will receive a new profile.

 

Returns

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

Since: 2.30


fma_object_action_attach_profile ()

void
fma_object_action_attach_profile (FMAObjectAction *action,
                                  FMAObjectProfile *profile);

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

Parameters

action

the FMAObjectAction action to which the profile will be attached.

 

profile

the FMAObjectProfile profile to be attached to action .

 

Since: 2.30


fma_object_action_set_last_version ()

void
fma_object_action_set_last_version (FMAObjectAction *action);

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

Parameters

action

the FMAObjectAction action to update.

 

Since: 2.30

Types and Values

FMA_TYPE_OBJECT_ACTION

#define FMA_TYPE_OBJECT_ACTION                ( fma_object_action_get_type())

FMAObjectAction

typedef struct _FMAObjectAction FMAObjectAction;

Property Details

The “factory-data-all-mimetypes” property

  “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 “factory-data-basenames” property

  “factory-data-basenames”   gpointer

Flags: Read / Write


The “factory-data-capabilitites” property

  “factory-data-capabilitites” gpointer

Flags: Read / Write


The “factory-data-description” property

  “factory-data-description” gchar *

Flags: Read / Write

Default value: ""


The “factory-data-enabled” property

  “factory-data-enabled”     gboolean

Flags: Read / Write

Default value: TRUE


The “factory-data-folders” property

  “factory-data-folders”     gpointer

Flags: Read / Write


The “factory-data-icon” property

  “factory-data-icon”        gchar *

Flags: Read / Write

Default value: ""


The “factory-data-id” property

  “factory-data-id”          gchar *

Internal identifier of the FMAObjectId object. Historically a UUID used as a GConf 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 “factory-data-items” property

  “factory-data-items”       gpointer

List of subitems objects.

Flags: Read / Write


The “factory-data-items-slist” property

  “factory-data-items-slist” gpointer

Flags: Read / Write


The “factory-data-iversion” property

  “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 “factory-data-label” property

  “factory-data-label”       gchar *

Flags: Read / Write

Default value: "Empty label"


The “factory-data-last-allocated” property

  “factory-data-last-allocated” guint

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

Flags: Read / Write

Default value: 0


The “factory-data-matchcase” property

  “factory-data-matchcase”   gboolean

Flags: Read / Write

Default value: TRUE


The “factory-data-mimetypes” property

  “factory-data-mimetypes”   gpointer

Flags: Read / Write


The “factory-data-not-show-in” property

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

Defaults to none.

Flags: Read / Write


The “factory-data-only-show-in” property

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

Defaults to all.

Flags: Read / Write


The “factory-data-parent” property

  “factory-data-parent”      gpointer

The FMAObjectItem which is the parent of this object.

Flags: Read / Write


The “factory-data-provider” property

  “factory-data-provider”    gpointer

A pointer to the FMAIOProvider object.

Flags: Read / Write


The “factory-data-provider-data” property

  “factory-data-provider-data” gpointer

A pointer to some FMAIOProvider specific data.

Flags: Read / Write


The “factory-data-readonly” property

  “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 “factory-data-schemes” property

  “factory-data-schemes”     gpointer

Flags: Read / Write


The “factory-data-selection-count” property

  “factory-data-selection-count” gchar *

Flags: Read / Write

Default value: ">0"


The “factory-data-shortcut” property

  “factory-data-shortcut”    gchar *

Flags: Read / Write

Default value: ""


The “factory-data-show-if-registered” property

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

Flags: Read / Write

Default value: ""


The “factory-data-show-if-running” property

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

Flags: Read / Write

Default value: ""


The “factory-data-show-if-true” property

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

Flags: Read / Write

Default value: ""


The “factory-data-target-location” property

  “factory-data-target-location” gboolean

Flags: Read / Write

Default value: FALSE


The “factory-data-target-selection” property

  “factory-data-target-selection” gboolean

Flags: Read / Write

Default value: TRUE


The “factory-data-target-toolbar” property

  “factory-data-target-toolbar” gboolean

Flags: Read / Write

Default value: FALSE


The “factory-data-toolbar-label” property

  “factory-data-toolbar-label” gchar *

Flags: Read / Write

Default value: ""


The “factory-data-toolbar-same-label” property

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

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

Flags: Read / Write

Default value: TRUE


The “factory-data-tooltip” property

  “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 “factory-data-try-exec” property

  “factory-data-try-exec”    gchar *

Flags: Read / Write

Default value: ""


The “factory-data-version” property

  “factory-data-version”     gchar *

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

Flags: Read / Write

Default value: ""