[nautilus-actions/file-manager-actions] NAObject classes are renamed to FMAObject
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NAObject classes are renamed to FMAObject
- Date: Mon, 7 Sep 2015 22:09:47 +0000 (UTC)
commit 74b6cf294a18ddcacb82eab6ca0a03eb546360c1
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Sep 7 23:03:39 2015 +0200
NAObject classes are renamed to FMAObject
src/api/Makefile.am | 14 +-
src/api/fma-data-def.h | 2 +-
src/api/fma-icontext.h | 10 +-
src/api/fma-iduplicable.h | 6 +-
src/api/fma-iexporter.h | 18 +-
src/api/fma-ifactory-object-data.h | 14 +-
src/api/fma-ifactory-object.h | 22 +-
src/api/fma-iimporter.h | 26 +-
src/api/fma-iio-provider.h | 26 +-
src/api/fma-object-action.h | 98 +++++
src/api/fma-object-api.h | 221 +++++++++++
src/api/fma-object-id.h | 111 ++++++
src/api/fma-object-item.h | 115 ++++++
src/api/fma-object-menu.h | 76 ++++
src/api/fma-object-profile.h | 85 +++++
src/api/fma-object.h | 176 +++++++++
src/api/na-object-action.h | 98 -----
src/api/na-object-api.h | 221 -----------
src/api/na-object-id.h | 111 ------
src/api/na-object-item.h | 115 ------
src/api/na-object-menu.h | 76 ----
src/api/na-object-profile.h | 85 -----
src/api/na-object.h | 176 ---------
src/core/Makefile.am | 22 +-
src/core/fma-icontext.c | 78 ++--
src/core/fma-iduplicable.c | 8 +-
src/core/fma-ifactory-provider.c | 2 +-
src/core/fma-iimporter.c | 14 +-
src/core/fma-iio-provider.c | 2 +-
...ction-factory.c => fma-object-action-factory.c} | 6 +-
.../{na-object-action.c => fma-object-action.c} | 292 ++++++++--------
...object-id-factory.c => fma-object-id-factory.c} | 8 +-
src/core/{na-object-id.c => fma-object-id.c} | 154 ++++----
...ct-item-factory.c => fma-object-item-factory.c} | 8 +-
src/core/{na-object-item.c => fma-object-item.c} | 394 ++++++++++----------
...ct-menu-factory.c => fma-object-menu-factory.c} | 4 +-
src/core/{na-object-menu.c => fma-object-menu.c} | 120 +++---
...file-factory.c => fma-object-profile-factory.c} | 2 +-
.../{na-object-profile.c => fma-object-profile.c} | 250 ++++++------
src/core/{na-object.c => fma-object.c} | 298 ++++++++--------
src/core/na-exporter.c | 16 +-
src/core/na-exporter.h | 6 +-
src/core/na-factory-object.c | 10 +-
src/core/na-importer-ask.c | 26 +-
src/core/na-importer-ask.h | 4 +-
src/core/na-importer.c | 38 +-
src/core/na-importer.h | 10 +-
src/core/na-io-provider.c | 94 +++---
src/core/na-io-provider.h | 6 +-
src/core/na-iprefs.c | 2 +-
src/core/na-pivot.c | 32 +-
src/core/na-pivot.h | 4 +-
src/core/na-tokens.c | 18 +-
src/core/na-tokens.h | 6 +-
src/core/na-updater.c | 82 ++--
src/core/na-updater.h | 14 +-
src/io-desktop/nadp-desktop-file.h | 2 +-
src/io-desktop/nadp-desktop-provider.h | 2 +-
src/io-desktop/nadp-reader.c | 98 +++---
src/io-desktop/nadp-writer.c | 70 ++--
src/io-desktop/nadp-writer.h | 6 +-
src/io-gconf/nagp-reader.c | 72 ++--
src/io-gconf/nagp-writer.c | 44 ++--
src/io-gconf/nagp-writer.h | 4 +-
src/io-xml/naxml-reader.c | 88 +++---
src/io-xml/naxml-reader.h | 2 +-
src/io-xml/naxml-writer.c | 96 +++---
src/nact/nact-assistant-export.c | 16 +-
src/nact/nact-assistant-import.c | 20 +-
src/nact/nact-clipboard.c | 42 +-
src/nact/nact-export-ask.c | 12 +-
src/nact/nact-export-ask.h | 4 +-
src/nact/nact-iaction-tab.c | 130 ++++----
src/nact/nact-iaction-tab.h | 4 +-
src/nact/nact-ibasenames-tab.c | 10 +-
src/nact/nact-icapabilities-tab.c | 6 +-
src/nact/nact-icommand-tab.c | 38 +-
src/nact/nact-icommand-tab.h | 2 +-
src/nact/nact-ienvironment-tab.c | 42 +-
src/nact/nact-iexecution-tab.c | 28 +-
src/nact/nact-ifolders-tab.c | 6 +-
src/nact/nact-imimetypes-tab.c | 6 +-
src/nact/nact-iproperties-tab.c | 38 +-
src/nact/nact-ischemes-tab.c | 6 +-
src/nact/nact-main-tab.c | 2 +-
src/nact/nact-main-window.c | 50 ++--
src/nact/nact-match-list.c | 2 +-
src/nact/nact-menu-edit.c | 98 +++---
src/nact/nact-menu-file.c | 78 ++--
src/nact/nact-menu.c | 46 ++--
src/nact/nact-menu.h | 2 +-
src/nact/nact-providers-list.c | 2 +-
src/nact/nact-schemes-list.c | 4 +-
src/nact/nact-tree-ieditable.c | 138 ++++----
src/nact/nact-tree-ieditable.h | 4 +-
src/nact/nact-tree-model-dnd.c | 94 +++---
src/nact/nact-tree-model.c | 168 +++++-----
src/nact/nact-tree-model.h | 14 +-
src/nact/nact-tree-view.c | 56 ++--
src/nact/nact-tree-view.h | 4 +-
src/plugin-menu/nautilus-actions.c | 148 ++++----
src/test/test-reader.c | 2 +-
src/utils/na-print-schemas.c | 6 +-
src/utils/nautilus-actions-new.c | 84 ++--
src/utils/nautilus-actions-print.c | 14 +-
src/utils/nautilus-actions-run.c | 34 +-
106 files changed, 2938 insertions(+), 2938 deletions(-)
---
diff --git a/src/api/Makefile.am b/src/api/Makefile.am
index 8908bfb..5967e7c 100644
--- a/src/api/Makefile.am
+++ b/src/api/Makefile.am
@@ -48,12 +48,12 @@ api_include_HEADERS = \
fma-iduplicable.h \
fma-ifactory-object.h \
fma-ifactory-object-data.h \
- na-object-api.h \
- na-object.h \
- na-object-id.h \
- na-object-item.h \
- na-object-action.h \
- na-object-profile.h \
- na-object-menu.h \
+ fma-object-api.h \
+ fma-object.h \
+ fma-object-id.h \
+ fma-object-item.h \
+ fma-object-action.h \
+ fma-object-profile.h \
+ fma-object-menu.h \
na-timeout.h \
$(NULL)
diff --git a/src/api/fma-data-def.h b/src/api/fma-data-def.h
index d1dcbbd..c8f2c97 100644
--- a/src/api/fma-data-def.h
+++ b/src/api/fma-data-def.h
@@ -37,7 +37,7 @@
* @include: file-manager-actions/fma-data-def.h
*
* #FMADataDef and #FMADataGroup are structures which handle the list of
- * elementary datas for each and every #NAObjectItem which happens to
+ * elementary datas for each and every #FMAObjectItem which happens to
* implement the #FMAIFactoryObject interface.
*/
diff --git a/src/api/fma-icontext.h b/src/api/fma-icontext.h
index 355bc03..7bb1038 100644
--- a/src/api/fma-icontext.h
+++ b/src/api/fma-icontext.h
@@ -36,12 +36,12 @@
* @short_description: The Contextual Interface
* @include: file-manager-actions/fma-icontext.h
*
- * This interface is implemented by all #NAObject -derived objects
+ * This interface is implemented by all #FMAObject -derived objects
* whose the display in the Nautilus context menu is subject to some
* conditions.
*
- * Implementors, typically #NAObjectAction, #NAObjectProfile and
- * #NAObjectMenu, host the required data as #FMADataBoxed in a dedicated
+ * Implementors, typically #FMAObjectAction, #FMAObjectProfile and
+ * #FMAObjectMenu, host the required data as #FMADataBoxed in a dedicated
* FMA_FACTORY_CONDITIONS_GROUP data group.
*/
@@ -59,7 +59,7 @@ typedef struct _FMAIContextInterfacePrivate FMAIContextInterfacePrivate;
/**
* FMAIContextInterface:
- * @is_candidate: determines if the given NAObject-derived object is
+ * @is_candidate: determines if the given FMAObject-derived object is
* candidate to display in Nautilus.
*
* This interface manages all conditions relevant to a displayable status
@@ -75,7 +75,7 @@ typedef struct {
* is_candidate:
* @object: this FMAIContext object.
* @target: the initial target which triggered this function's stack.
- * This target is defined in na-object-item.h.
+ * This target is defined in fma-object-item.h.
* @selection: the current selection as a GList of NautilusFileInfo.
*
* The FMAIContext implementor may take advantage of this
diff --git a/src/api/fma-iduplicable.h b/src/api/fma-iduplicable.h
index 9725a41..1832f00 100644
--- a/src/api/fma-iduplicable.h
+++ b/src/api/fma-iduplicable.h
@@ -36,8 +36,8 @@
* @short_description: The Duplication Interface
* @include: file-manager-actions/private/fma-iduplicable.h
*
- * This interface is implemented by #NAObject in order to let
- * #NAObject -derived instance duplication be easily tracked. This works
+ * This interface is implemented by #FMAObject in order to let
+ * #FMAObject -derived instance duplication be easily tracked. This works
* by keeping a pointer on the original object at duplication time, and
* then only checking edition status when explicitely required.
*
@@ -119,7 +119,7 @@ typedef struct _FMAIDuplicableInterfacePrivate FMAIDuplicableInterfacePrivate
* @are_equal: tests if two objects are equals.
* @is_valid: tests if one object is valid.
*
- * This interface is implemented by #NAObject objects, in order to be able
+ * This interface is implemented by #FMAObject objects, in order to be able
* to keep the trace of all duplicated objects.
*/
typedef struct {
diff --git a/src/api/fma-iexporter.h b/src/api/fma-iexporter.h
index 9d214ae..4aef4af 100644
--- a/src/api/fma-iexporter.h
+++ b/src/api/fma-iexporter.h
@@ -144,7 +144,7 @@
*/
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include "na-object-item.h"
+#include "fma-object-item.h"
G_BEGIN_DECLS
@@ -184,7 +184,7 @@ typedef struct {
* FMAIExporterFileParms:
* @version: [in] version of this structure;
* since structure version 1.
- * @exported: [in] exported NAObjectItem-derived object;
+ * @exported: [in] exported FMAObjectItem-derived object;
* since structure version 1.
* @folder: [in] URI of the target folder;
* since structure version 1.
@@ -204,7 +204,7 @@ typedef struct {
*/
typedef struct {
guint version;
- NAObjectItem *exported;
+ FMAObjectItem *exported;
gchar *folder;
GQuark format;
gchar *basename;
@@ -216,7 +216,7 @@ typedef struct {
* FMAIExporterBufferParms:
* @version: [in] version of this structure;
* since structure version 1.
- * @exported: [in] exported NAObjectItem-derived object;
+ * @exported: [in] exported FMAObjectItem-derived object;
* since structure version 1.
* @format: [in] export format as a GQuark;
* since structure version 1.
@@ -234,7 +234,7 @@ typedef struct {
*/
typedef struct {
guint version;
- NAObjectItem *exported;
+ FMAObjectItem *exported;
GQuark format;
gchar *buffer;
GSList *messages;
@@ -319,7 +319,7 @@ typedef struct {
* @content: [in] version of the content of this structure;
* equals to 1;
* since structure version 2.
- * @exported: [in] exported NAObjectItem-derived object;
+ * @exported: [in] exported FMAObjectItem-derived object;
* since structure version 1.
* @folder: [in] URI of the target folder;
* since structure version 1.
@@ -340,7 +340,7 @@ typedef struct {
typedef struct {
guint version;
guint content;
- NAObjectItem *exported;
+ FMAObjectItem *exported;
gchar *folder;
gchar *format;
gchar *basename;
@@ -356,7 +356,7 @@ typedef struct {
* @content: [in] version of the content of this structure;
* equals to 1;
* since structure version 2.
- * @exported: [in] exported NAObjectItem-derived object;
+ * @exported: [in] exported FMAObjectItem-derived object;
* since structure version 1.
* @format: [in] export format string identifier;
* since structure version 2.
@@ -375,7 +375,7 @@ typedef struct {
typedef struct {
guint version;
guint content;
- NAObjectItem *exported;
+ FMAObjectItem *exported;
gchar *format;
gchar *buffer;
GSList *messages;
diff --git a/src/api/fma-ifactory-object-data.h b/src/api/fma-ifactory-object-data.h
index d0b892e..cbb659c 100644
--- a/src/api/fma-ifactory-object-data.h
+++ b/src/api/fma-ifactory-object-data.h
@@ -38,7 +38,7 @@
*
* Each elementary data get its own name here.
*
- * Through #FMADataDef and #FMADataGroup definitions, each #NAObjectItem
+ * Through #FMADataDef and #FMADataGroup definitions, each #FMAObjectItem
* derived object which implement the #FMAIFactoryObject interface will
* dynamically define a property for each attached elementary data.
*/
@@ -50,7 +50,7 @@ G_BEGIN_DECLS
/**
* FMA_FACTORY_OBJECT_ID_GROUP:
*
- * #NAObjectId common data.
+ * #FMAObjectId common data.
*/
#define FMA_FACTORY_OBJECT_ID_GROUP "na-factory-group-id"
#define FMAFO_DATA_ID "na-factory-data-id"
@@ -61,7 +61,7 @@ G_BEGIN_DECLS
/**
* FMA_FACTORY_OBJECT_ITEM_GROUP:
*
- * #NAObjectItem common data.
+ * #FMAObjectItem common data.
*/
#define FMA_FACTORY_OBJECT_ITEM_GROUP "na-factory-group-item"
#define FMAFO_DATA_IVERSION "na-factory-data-iversion"
@@ -81,7 +81,7 @@ G_BEGIN_DECLS
/**
* FMA_FACTORY_OBJECT_ACTION_GROUP:
*
- * #NAObjectAction specific datas.
+ * #FMAObjectAction specific datas.
*/
#define FMA_FACTORY_OBJECT_ACTION_GROUP "na-factory-group-action"
#define FMAFO_DATA_VERSION "na-factory-data-version"
@@ -96,7 +96,7 @@ G_BEGIN_DECLS
* FMA_FACTORY_ACTION_V1_GROUP:
*
* A group of datas which are specific to v 1 actions. It happens to be
- * empty as all these datas have been alter embedded in #NAObjectItem
+ * empty as all these datas have been alter embedded in #FMAObjectItem
* data group.
*/
#define FMA_FACTORY_ACTION_V1_GROUP "na-factory-group-action-v1"
@@ -104,7 +104,7 @@ G_BEGIN_DECLS
/**
* FMA_FACTORY_OBJECT_MENU_GROUP:
*
- * #NAObjectMenu specific datas. It happens to be empty as the definition
+ * #FMAObjectMenu specific datas. It happens to be empty as the definition
* of a menu is very close of those of an action.
*/
#define FMA_FACTORY_OBJECT_MENU_GROUP "na-factory-group-menu"
@@ -112,7 +112,7 @@ G_BEGIN_DECLS
/**
* FMA_FACTORY_OBJECT_PROFILE_GROUP:
*
- * #NAObjectProfile specific datas.
+ * #FMAObjectProfile specific datas.
*/
#define FMA_FACTORY_OBJECT_PROFILE_GROUP "na-factory-group-profile"
#define FMAFO_DATA_DESCNAME "na-factory-data-descname"
diff --git a/src/api/fma-ifactory-object.h b/src/api/fma-ifactory-object.h
index 63abf66..0f5c9e7 100644
--- a/src/api/fma-ifactory-object.h
+++ b/src/api/fma-ifactory-object.h
@@ -33,13 +33,13 @@
/**
* SECTION: ifactory-object
* @title: FMAIFactoryObject
- * @short_description: The #NAObjectItem Interface v 1
+ * @short_description: The #FMAObjectItem Interface v 1
* @include: file-manager-actions/na-ifactory_object.h
*
- * This interface is implemented by #NAObjectItem derived objects so that they
+ * This interface is implemented by #FMAObjectItem derived objects so that they
* can take advantage of our data factory management system.
*
- * A #NAObjectItem derived object which would implement this #FMAIFactoryObject
+ * A #FMAObjectItem derived object which would implement this #FMAIFactoryObject
* interface must meet following conditions:
* <itemizedlist>
* <listitem>
@@ -92,18 +92,18 @@ typedef struct _FMAIFactoryObjectInterfacePrivate FMAIFactoryObjectInterface
/**
* FMAIFactoryObjectInterface:
- * @get_version: returns the version of this interface the NAObjectItem implements.
+ * @get_version: returns the version of this interface the FMAObjectItem implements.
* @get_groups: returns a pointer to the FMADataGroup which defines this object.
* @copy: post copy callback.
- * @are_equal: tests if two NAObjectItem are equals.
- * @is_valid: tests if one NAObjectItem is valid.
- * @read_start: triggered before serializing a NAObjectItem.
- * @read_done: triggered after a NAObjectItem has been serialized.
- * @write_start: triggered before unserializing a NAObjectItem.
- * @write_done: triggered after a NAObjectItem has been unserialized.
+ * @are_equal: tests if two FMAObjectItem are equals.
+ * @is_valid: tests if one FMAObjectItem is valid.
+ * @read_start: triggered before serializing a FMAObjectItem.
+ * @read_done: triggered after a FMAObjectItem has been serialized.
+ * @write_start: triggered before unserializing a FMAObjectItem.
+ * @write_done: triggered after a FMAObjectItem has been unserialized.
*
* In order to take full advantage of our data managament system,
- * NAObjectItem-derived objects all implement this #FMAIFactoryObject
+ * FMAObjectItem-derived objects all implement this #FMAIFactoryObject
* interface.
*/
typedef struct {
diff --git a/src/api/fma-iimporter.h b/src/api/fma-iimporter.h
index 126e3c2..0daef8d 100644
--- a/src/api/fma-iimporter.h
+++ b/src/api/fma-iimporter.h
@@ -97,7 +97,7 @@
* </refsect2>
*/
-#include "na-object-item.h"
+#include "fma-object-item.h"
G_BEGIN_DECLS
@@ -168,7 +168,7 @@ typedef struct {
#ifdef NA_ENABLE_DEPRECATED
/**
* FMAIImporterCheckFn:
- * @imported: the currently imported #NAObjectItem -derived object.
+ * @imported: the currently imported #FMAObjectItem -derived object.
* @fn_data: some data to be passed to the function.
*
* In version 1 of the interface, this function may be provided by
@@ -200,17 +200,17 @@ typedef struct {
* Items which may have been loaded by NAPivot at the start of the
* application, and deleted meanwhile, are just ignored.
*
- * Returns: the already existing #NAObjectItem with same id, or %NULL.
+ * Returns: the already existing #FMAObjectItem with same id, or %NULL.
*
* Since: 2.30
* Deprecated: 3.2
*/
-typedef NAObjectItem * ( *FMAIImporterCheckFn )( const NAObjectItem *, void * );
+typedef FMAObjectItem * ( *FMAIImporterCheckFn )( const FMAObjectItem *, void * );
/**
* FMAIImporterAskUserFn:
- * @imported: the currently imported #NAObjectItem.
- * @existing: an already existing #NAObjectItem with same id.
+ * @imported: the currently imported #FMAObjectItem.
+ * @existing: an already existing #FMAObjectItem with same id.
* @fn_data: some data to be passed to the function.
*
* In version 1 of the interface, this function may be provided by the
@@ -227,13 +227,13 @@ typedef NAObjectItem * ( *FMAIImporterCheckFn )( const NAObjectItem *, void * );
* Since: 2.30
* Deprecated: 3.2
*/
-typedef guint ( *FMAIImporterAskUserFn )( const NAObjectItem *, const NAObjectItem *, void * );
+typedef guint ( *FMAIImporterAskUserFn )( const FMAObjectItem *, const FMAObjectItem *, void * );
/**
* FMAIImporterManageImportModeParms:
* @version: [in] the version of the structure content, equals to 1;
* since structure version 1.
- * @imported: [in] the imported #NAObjectItem -derived object;
+ * @imported: [in] the imported #FMAObjectItem -derived object;
* since structure version 1.
* @asked_mode: [in] asked import mode;
* since structure version 1.
@@ -261,7 +261,7 @@ typedef guint ( *FMAIImporterAskUserFn )( const NAObjectItem *, const NAObjectIt
*/
typedef struct {
guint version;
- NAObjectItem *imported;
+ FMAObjectItem *imported;
guint asked_mode;
FMAIImporterCheckFn check_fn;
void *check_fn_data;
@@ -306,7 +306,7 @@ guint fma_iimporter_manage_import_mode( FMAIImporterManageImportModeParms *parms
* since structure version 1.
* @import_mode: [out] actually used import mode;
* since structure version 1.
- * @imported: [out] the imported #NAObjectItem -derived object, or %NULL;
+ * @imported: [out] the imported #FMAObjectItem -derived object, or %NULL;
* since structure version 1.
* @check_fn: [in] a FMAIImporterCheckFn() function to check the existence
* of the imported id;
@@ -335,7 +335,7 @@ typedef struct {
guint asked_mode;
gboolean exist;
guint import_mode;
- NAObjectItem *imported;
+ FMAObjectItem *imported;
FMAIImporterCheckFn check_fn;
void *check_fn_data;
FMAIImporterAskUserFn ask_fn;
@@ -384,7 +384,7 @@ typedef enum {
* since structure version 2.
* @uri: [in] uri of the file to be imported;
* since structure version 1.
- * @imported: [out] the imported #NAObjectItem -derived object, or %NULL;
+ * @imported: [out] the imported #FMAObjectItem -derived object, or %NULL;
* since structure version 1.
* @messages: [in/out] a #GSList list of localized strings;
* the provider may append messages to this list, but
@@ -400,7 +400,7 @@ typedef struct {
guint version;
guint content;
const gchar *uri;
- NAObjectItem *imported;
+ FMAObjectItem *imported;
GSList *messages;
}
FMAIImporterImportFromUriParmsv2;
diff --git a/src/api/fma-iio-provider.h b/src/api/fma-iio-provider.h
index 766eaeb..aee7f71 100644
--- a/src/api/fma-iio-provider.h
+++ b/src/api/fma-iio-provider.h
@@ -193,7 +193,7 @@
* </refsect2>
*/
-#include "na-object-item.h"
+#include "fma-object-item.h"
G_BEGIN_DECLS
@@ -290,7 +290,7 @@ typedef struct {
* then this greatly lowerize the interest of this I/O provider (!).
*
* Return value: if implemented, this method must return a unordered
- * flat GList of NAObjectItem-derived objects (menus or actions);
+ * flat GList of FMAObjectItem-derived objects (menus or actions);
* the actions embed their own profiles.
*
* Defaults to NULL list.
@@ -307,7 +307,7 @@ typedef struct {
* It is not supposed to make any assumption on the environment it is
* currently running on.
* This property just says that the developer/maintainer has released
- * the needed code in order to update/create/delete NAObjectItem-derived
+ * the needed code in order to update/create/delete FMAObjectItem-derived
* objects.
*
* Note that even if this property is TRUE, there is yet many
@@ -360,7 +360,7 @@ typedef struct {
/**
* write_item:
* @instance: the FMAIIOProvider provider.
- * @item: a NAObjectItem-derived item, menu or action.
+ * @item: a FMAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
@@ -379,12 +379,12 @@ typedef struct {
*
* Since: 2.30
*/
- guint ( *write_item ) ( const FMAIIOProvider *instance, const NAObjectItem *item, GSList
**messages );
+ guint ( *write_item ) ( const FMAIIOProvider *instance, const FMAObjectItem *item, GSList
**messages );
/**
* delete_item:
* @instance: the FMAIIOProvider provider.
- * @item: a NAObjectItem-derived item, menu or action.
+ * @item: a FMAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
@@ -398,32 +398,32 @@ typedef struct {
*
* Since: 2.30
*/
- guint ( *delete_item ) ( const FMAIIOProvider *instance, const NAObjectItem *item, GSList
**messages );
+ guint ( *delete_item ) ( const FMAIIOProvider *instance, const FMAObjectItem *item, GSList
**messages );
/**
* duplicate_data:
* @instance: the FMAIIOProvider provider.
- * @dest: a NAObjectItem-derived item, menu or action.
- * @source: a NAObjectItem-derived item, menu or action.
+ * @dest: a FMAObjectItem-derived item, menu or action.
+ * @source: a FMAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
* FileManager-Actions typically calls this method while duplicating
- * a NAObjectItem-derived object, in order to let the I/O provider
+ * a FMAObjectItem-derived object, in order to let the I/O provider
* duplicates itself specific data (if any) it may have set on
* @source object.
*
* Note that this does not duplicate in any way any
- * NAObjectItem-derived object. We are just dealing here with
+ * FMAObjectItem-derived object. We are just dealing here with
* the provider-specific data which may have been attached to
- * the NAObjectItem-derived object.
+ * the FMAObjectItem-derived object.
*
* Return value: FMA_IIO_PROVIDER_CODE_OK if the duplicate operation
* was successful, or another code depending of the detected error.
*
* Since: 2.30
*/
- guint ( *duplicate_data ) ( const FMAIIOProvider *instance, NAObjectItem *dest, const
NAObjectItem *source, GSList **messages );
+ guint ( *duplicate_data ) ( const FMAIIOProvider *instance, FMAObjectItem *dest, const
FMAObjectItem *source, GSList **messages );
}
FMAIIOProviderInterface;
diff --git a/src/api/fma-object-action.h b/src/api/fma-object-action.h
new file mode 100644
index 0000000..98d26e0
--- /dev/null
+++ b/src/api/fma-object-action.h
@@ -0,0 +1,98 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_ACTION_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_ACTION_H__
+
+/**
+ * SECTION: object-action
+ * @title: FMAObjectAction
+ * @short_description: The Action Class Definition
+ * @include: file-manager-actions/fma-object-action.h
+ *
+ * This is the class which maintains data and properties of a &prodname;
+ * action.
+ *
+ * <note>
+ * <formalpara>
+ * <title>Edition status</title>
+ * <para>
+ * 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).
+ * </para>
+ * </formalpara>
+ * </note>
+ */
+
+#include "fma-object-item.h"
+#include "fma-object-profile.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT_ACTION ( fma_object_action_get_type())
+#define FMA_OBJECT_ACTION( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ACTION,
FMAObjectAction ))
+#define FMA_OBJECT_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT_ACTION,
FMAObjectActionClass ))
+#define FMA_IS_OBJECT_ACTION( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ACTION ))
+#define FMA_IS_OBJECT_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT_ACTION ))
+#define FMA_OBJECT_ACTION_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ),
FMA_TYPE_OBJECT_ACTION, FMAObjectActionClass ))
+
+typedef struct _FMAObjectActionPrivate FMAObjectActionPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectItem parent;
+ FMAObjectActionPrivate *private;
+}
+ FMAObjectAction;
+
+typedef struct _FMAObjectActionClassPrivate FMAObjectActionClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectItemClass parent;
+ FMAObjectActionClassPrivate *private;
+}
+ FMAObjectActionClass;
+
+GType fma_object_action_get_type ( void );
+
+FMAObjectAction *fma_object_action_new ( void );
+FMAObjectAction *fma_object_action_new_with_profile ( void );
+FMAObjectAction *fma_object_action_new_with_defaults ( void );
+
+gchar *fma_object_action_get_new_profile_name( const FMAObjectAction *action );
+
+void fma_object_action_attach_profile ( FMAObjectAction *action, FMAObjectProfile *profile
);
+void fma_object_action_set_last_version ( FMAObjectAction *action );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_ACTION_H__ */
diff --git a/src/api/fma-object-api.h b/src/api/fma-object-api.h
new file mode 100644
index 0000000..a4d260e
--- /dev/null
+++ b/src/api/fma-object-api.h
@@ -0,0 +1,221 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_API_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_API_H__
+
+/**
+ * SECTION: object-api
+ * @title: API
+ * @short_description: The Common Public #FMAObject API
+ * @include: file-manager-actions/fma-object-api.h
+ *
+ * We define here a common API which makes easier to write (and read)
+ * the code; all object functions are named fma_object; all arguments
+ * are casted directly in the macro.
+ */
+
+#include "fma-ifactory-object.h"
+#include "fma-ifactory-object-data.h"
+#include "fma-iduplicable.h"
+#include "fma-icontext.h"
+#include "fma-object-action.h"
+#include "fma-object-profile.h"
+#include "fma-object-menu.h"
+
+G_BEGIN_DECLS
+
+/* FMAIDuplicable
+ */
+#define fma_object_duplicate( obj, mode ) fma_iduplicable_duplicate( FMA_IDUPLICABLE( obj ),
mode )
+#define fma_object_check_status( obj ) fma_object_object_check_status_rec( FMA_OBJECT( obj
))
+
+#define fma_object_get_origin( obj ) fma_iduplicable_get_origin( FMA_IDUPLICABLE( obj ))
+#define fma_object_is_valid( obj ) fma_iduplicable_is_valid( FMA_IDUPLICABLE( obj ))
+#define fma_object_is_modified( obj ) fma_iduplicable_is_modified( FMA_IDUPLICABLE( obj ))
+
+#define fma_object_set_origin( obj, origin ) fma_iduplicable_set_origin( FMA_IDUPLICABLE( obj ),
( FMAIDuplicable * )( origin ))
+#define fma_object_reset_origin( obj, origin ) fma_object_object_reset_origin( FMA_OBJECT( obj ),
( FMAObject * )( origin ))
+
+/* FMAObject
+ */
+#define fma_object_dump( obj ) fma_object_object_dump( FMA_OBJECT( obj ))
+#define fma_object_dump_norec( obj ) fma_object_object_dump_norec( FMA_OBJECT( obj ))
+#define fma_object_dump_tree( tree ) fma_object_object_dump_tree( tree )
+#define fma_object_ref( obj ) fma_object_object_ref( FMA_OBJECT( obj ))
+#define fma_object_unref( obj ) fma_object_object_unref( FMA_OBJECT( obj ))
+
+#define fma_object_debug_invalid( obj, reason ) fma_object_object_debug_invalid( FMA_OBJECT( obj ),
( const gchar * )( reason ))
+
+/* FMAObjectId
+ */
+#define fma_object_get_id( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ID ))
+#define fma_object_get_label( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), ( FMA_IS_OBJECT_PROFILE( obj ) ? FMAFO_DATA_DESCNAME : FMAFO_DATA_LABEL )))
+#define fma_object_get_label_noloc( obj ) (( gchar * )( FMA_IS_OBJECT_PROFILE( obj ) ?
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_DESCNAME_NOLOC ) : NULL ))
+#define fma_object_get_parent( obj ) (( FMAObjectItem * )
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PARENT ))
+
+#define fma_object_set_id( obj, id ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ID, ( const void * )( id ))
+#define fma_object_set_label( obj, label ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), ( FMA_IS_OBJECT_PROFILE( obj ) ? FMAFO_DATA_DESCNAME : FMAFO_DATA_LABEL ), (
const void * )( label ))
+#define fma_object_set_parent( obj, parent ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PARENT, ( const void * )( parent ))
+
+#define fma_object_sort_alpha_asc( a, b ) fma_object_id_sort_alpha_asc( FMA_OBJECT_ID( a ),
FMA_OBJECT_ID( b ))
+#define fma_object_sort_alpha_desc( a, b ) fma_object_id_sort_alpha_desc( FMA_OBJECT_ID( a ),
FMA_OBJECT_ID( b ))
+
+#define fma_object_prepare_for_paste( obj, relabel, renumber, parent ) \
+ fma_object_id_prepare_for_paste( FMA_OBJECT_ID( obj
), ( relabel ), ( renumber ), ( FMAObjectId * )( parent ))
+#define fma_object_set_copy_of_label( obj ) fma_object_id_set_copy_of_label( FMA_OBJECT_ID( obj
))
+#define fma_object_set_new_id( obj, parent ) fma_object_id_set_new_id( FMA_OBJECT_ID( obj ), (
FMAObjectId * )( parent ))
+
+/* FMAObjectItem
+ */
+#define fma_object_get_tooltip( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLTIP ))
+#define fma_object_get_icon( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ICON ))
+#define fma_object_get_icon_noloc( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ICON_NOLOC ))
+#define fma_object_get_description( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_DESCRIPTION ))
+#define fma_object_get_items( obj ) (( GList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SUBITEMS ))
+#define fma_object_get_items_slist( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SUBITEMS_SLIST ))
+#define fma_object_is_enabled( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ENABLED )))
+#define fma_object_is_readonly( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_READONLY )))
+#define fma_object_get_provider( obj ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PROVIDER )
+#define fma_object_get_provider_data( obj ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PROVIDER_DATA )
+#define fma_object_get_iversion( obj ) GPOINTER_TO_UINT( fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_IVERSION ))
+#define fma_object_get_shortcut( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHORTCUT ))
+
+#define fma_object_set_tooltip( obj, tooltip ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLTIP, ( const void * )( tooltip ))
+#define fma_object_set_icon( obj, icon ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ICON, ( const void * )( icon ))
+#define fma_object_set_description( obj, desc ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_DESCRIPTION, ( const void * )( desc ))
+#define fma_object_set_items( obj, list ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SUBITEMS, ( const void * )( list ))
+#define fma_object_set_items_slist( obj, slist ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SUBITEMS_SLIST, ( const void * )( slist ))
+#define fma_object_set_enabled( obj, enabled ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ENABLED, ( const void * ) GUINT_TO_POINTER( enabled ))
+#define fma_object_set_readonly( obj, readonly ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_READONLY, ( const void * ) GUINT_TO_POINTER( readonly ))
+#define fma_object_set_provider( obj, provider ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PROVIDER, ( const void * )( provider ))
+#define fma_object_set_provider_data( obj, data ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PROVIDER_DATA, ( const void * )( data ))
+#define fma_object_set_iversion( obj, version ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_IVERSION, ( const void * ) GUINT_TO_POINTER( version ))
+#define fma_object_set_shortcut( obj, shortcut ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHORTCUT, ( const void * )( shortcut ))
+
+#define fma_object_get_item( obj, id ) fma_object_item_get_item( FMA_OBJECT_ITEM( obj ),(
const gchar * )( id ))
+#define fma_object_get_position( obj, child ) fma_object_item_get_position( FMA_OBJECT_ITEM( obj
), FMA_OBJECT_ID( child ))
+#define fma_object_append_item( obj, child ) fma_object_item_append_item( FMA_OBJECT_ITEM( obj
), FMA_OBJECT_ID( child ))
+#define fma_object_insert_at( obj, child, pos ) fma_object_item_insert_at( FMA_OBJECT_ITEM( obj ),
FMA_OBJECT_ID( child ), ( pos ))
+#define fma_object_insert_item( obj, child, sibling ) fma_object_item_insert_item( FMA_OBJECT_ITEM( obj
), FMA_OBJECT_ID( child ), ( FMAObjectId * )( sibling ))
+#define fma_object_remove_item( obj, child ) fma_object_item_remove_item( FMA_OBJECT_ITEM( obj
), FMA_OBJECT_ID( child ))
+
+#define fma_object_get_items_count( obj ) fma_object_item_get_items_count( FMA_OBJECT_ITEM(
obj ))
+#define fma_object_count_items( list, cm, ca, cp ) fma_object_item_count_items( list, ( cm ), ( ca ),
( cp ), TRUE )
+#define fma_object_copyref_items( tree ) fma_object_item_copyref_items( tree )
+#define fma_object_free_items( tree ) fma_object_item_free_items( tree )
+
+#define fma_object_is_finally_writable( obj, r ) fma_object_item_is_finally_writable(
FMA_OBJECT_ITEM( obj ), ( r ))
+#define fma_object_set_writability_status( obj, w, r ) fma_object_item_set_writability_status(
FMA_OBJECT_ITEM( obj ), ( w ), ( r ))
+
+/* FMAObjectAction
+ */
+#define fma_object_get_version( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_VERSION ))
+#define fma_object_is_target_selection( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_SELECTION )))
+#define fma_object_is_target_location( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_LOCATION )))
+#define fma_object_is_target_toolbar( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_TOOLBAR )))
+#define fma_object_get_toolbar_label( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLBAR_LABEL ))
+#define fma_object_is_toolbar_same_label( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLBAR_SAME_LABEL )))
+#define fma_object_get_last_allocated( obj ) (( guint ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_LAST_ALLOCATED )))
+
+#define fma_object_set_version( obj, version ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_VERSION, ( const void * )( version ))
+#define fma_object_set_target_selection( obj, target ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_SELECTION, ( const void * ) GUINT_TO_POINTER( target ))
+#define fma_object_set_target_location( obj, target ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_LOCATION, ( const void * ) GUINT_TO_POINTER( target ))
+#define fma_object_set_target_toolbar( obj, target ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TARGET_TOOLBAR, ( const void * ) GUINT_TO_POINTER( target ))
+#define fma_object_set_toolbar_label( obj, label ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLBAR_LABEL, ( const void * )( label ))
+#define fma_object_set_toolbar_same_label( obj, same ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TOOLBAR_SAME_LABEL, ( const void * ) GUINT_TO_POINTER( same ))
+#define fma_object_set_last_allocated( obj, last ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_LAST_ALLOCATED, ( const void * ) GUINT_TO_POINTER( last ))
+
+#define fma_object_set_last_version( obj ) fma_object_action_set_last_version(
FMA_OBJECT_ACTION( obj ))
+#define fma_object_reset_last_allocated( obj ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_LAST_ALLOCATED, ( const void * ) GUINT_TO_POINTER( 0 ))
+#define fma_object_attach_profile( obj, profile ) fma_object_action_attach_profile(
FMA_OBJECT_ACTION( obj ), FMA_OBJECT_PROFILE( profile ))
+
+/* FMAObjectProfile
+ */
+#define fma_object_get_path( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PATH ))
+#define fma_object_get_parameters( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PARAMETERS ))
+#define fma_object_get_working_dir( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_WORKING_DIR ))
+#define fma_object_get_execution_mode( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_EXECUTION_MODE ))
+#define fma_object_get_startup_notify( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_STARTUP_NOTIFY )))
+#define fma_object_get_startup_class( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_STARTUP_WMCLASS ))
+#define fma_object_get_execute_as( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_EXECUTE_AS ))
+
+#define fma_object_set_path( obj, path ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PATH, ( const void * )( path ))
+#define fma_object_set_parameters( obj, parms ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_PARAMETERS, ( const void * )( parms ))
+#define fma_object_set_working_dir( obj, uri ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_WORKING_DIR, ( const void * )( uri ))
+#define fma_object_set_execution_mode( obj, mode ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_EXECUTION_MODE, ( const void * )( mode ))
+#define fma_object_set_startup_notify( obj, notify ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_STARTUP_NOTIFY, ( const void * ) GUINT_TO_POINTER( notify ))
+#define fma_object_set_startup_class( obj, class ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_STARTUP_WMCLASS, ( const void * )( class ))
+#define fma_object_set_execute_as( obj, user ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_EXECUTE_AS, ( const void * )( user ))
+
+/* FMAIContext
+ */
+#define fma_object_check_mimetypes( obj ) fma_icontext_check_mimetypes( FMA_ICONTEXT( obj ))
+
+#define fma_object_get_basenames( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_BASENAMES ))
+#define fma_object_get_matchcase( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MATCHCASE )))
+#define fma_object_get_mimetypes( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MIMETYPES ))
+#define fma_object_get_all_mimetypes( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MIMETYPES_IS_ALL )))
+#define fma_object_get_folders( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_FOLDERS ))
+#define fma_object_get_schemes( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SCHEMES ))
+#define fma_object_get_only_show_in( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ONLY_SHOW ))
+#define fma_object_get_not_show_in( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_NOT_SHOW ))
+#define fma_object_get_try_exec( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TRY_EXEC ))
+#define fma_object_get_show_if_registered( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_REGISTERED ))
+#define fma_object_get_show_if_true( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_TRUE ))
+#define fma_object_get_show_if_running( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_RUNNING ))
+#define fma_object_get_selection_count( obj ) (( gchar * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SELECTION_COUNT ))
+#define fma_object_get_capabilities( obj ) (( GSList * ) fma_ifactory_object_get_as_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_CAPABILITITES ))
+
+#define fma_object_set_basenames( obj, bnames ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_BASENAMES, ( const void * )( bnames ))
+#define fma_object_set_matchcase( obj, match ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MATCHCASE, ( const void * ) GUINT_TO_POINTER( match ))
+#define fma_object_set_mimetypes( obj, types ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MIMETYPES, ( const void * )( types ))
+#define fma_object_set_all_mimetypes( obj, all ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MIMETYPES_IS_ALL, ( const void * ) GUINT_TO_POINTER( all ))
+#define fma_object_set_folders( obj, folders ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_FOLDERS, ( const void * )( folders ))
+#define fma_object_replace_folder( obj, old, new ) fma_icontext_replace_folder( FMA_ICONTEXT( obj ), (
const gchar * )( old ), ( const gchar * )( new ))
+#define fma_object_set_scheme( obj, scheme, add ) fma_icontext_set_scheme( FMA_ICONTEXT( obj ), (
const gchar * )( scheme ), ( add ))
+#define fma_object_set_schemes( obj, schemes ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SCHEMES, ( const void * )( schemes ))
+#define fma_object_set_only_show_in( obj, list ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ONLY_SHOW, ( const void * )( list ))
+#define fma_object_set_only_desktop( obj, desktop, add ) fma_icontext_set_only_desktop( FMA_ICONTEXT( obj ),
( const gchar * )( desktop ), ( add ))
+#define fma_object_set_not_show_in( obj, list ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_NOT_SHOW, ( const void * )( list ))
+#define fma_object_set_not_desktop( obj, desktop, add ) fma_icontext_set_not_desktop( FMA_ICONTEXT( obj ),
( const gchar * )( desktop ), ( add ))
+#define fma_object_set_try_exec( obj, exec ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_TRY_EXEC, ( const void * )( exec ))
+#define fma_object_set_show_if_registered( obj, name ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_REGISTERED, ( const void * )( name ))
+#define fma_object_set_show_if_true( obj, exec ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_TRUE, ( const void * )( exec ))
+#define fma_object_set_show_if_running( obj, name ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SHOW_IF_RUNNING, ( const void * )( name ))
+#define fma_object_set_selection_count( obj, cond ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_SELECTION_COUNT, ( const void * )( cond ))
+#define fma_object_set_capabilities( obj, cap ) fma_ifactory_object_set_from_void(
FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_CAPABILITITES, ( const void * )( cap ))
+
+#ifdef NA_ENABLE_DEPRECATED
+#define fma_object_set_modified( obj, modified ) fma_iduplicable_set_modified( FMA_IDUPLICABLE( obj
), ( modified ))
+#endif
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_API_H__ */
diff --git a/src/api/fma-object-id.h b/src/api/fma-object-id.h
new file mode 100644
index 0000000..955a9f2
--- /dev/null
+++ b/src/api/fma-object-id.h
@@ -0,0 +1,111 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_ID_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_ID_H__
+
+/**
+ * SECTION: object-id
+ * @title: FMAObjectId
+ * @short_description: The Identified Object Base Class Definition
+ * @include: file-manager-actions/fma-object-id.h
+ *
+ * This is a pure virtual class, i.e. not an instantiatable one.
+ * It serves as the base class for #FMAObject -derived object which have
+ * a unique Id, i.e. for #FMAObjectItem and #FMAObjectProfile.
+ */
+
+#include "fma-object.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT_ID ( fma_object_id_get_type())
+#define FMA_OBJECT_ID( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ID,
FMAObjectId ))
+#define FMA_OBJECT_ID_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT_ID,
FMAObjectIdClass ))
+#define FMA_IS_OBJECT_ID( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ID ))
+#define FMA_IS_OBJECT_ID_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT_ID ))
+#define FMA_OBJECT_ID_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_OBJECT_ID,
FMAObjectIdClass ))
+
+typedef struct _FMAObjectIdPrivate FMAObjectIdPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObject parent;
+ FMAObjectIdPrivate *private;
+}
+ FMAObjectId;
+
+typedef struct _FMAObjectIdClassPrivate FMAObjectIdClassPrivate;
+
+/**
+ * FMAObjectIdClass:
+ * @new_id: Allocate a new id to an existing FMAObjectId.
+ *
+ * The #FMAObjectIdClass defines some methods available to derived classes.
+ */
+typedef struct {
+ /*< private >*/
+ FMAObjectClass parent;
+ FMAObjectIdClassPrivate *private;
+
+ /*< public >*/
+ /**
+ * new_id:
+ * @object: a FMAObjectId object.
+ * @new_parent: possibly the new FMAObjectId parent, or NULL.
+ * If not NULL, this should actually be a FMAObjectItem.
+ *
+ * If @object is a FMAObjectProfile, then @new_parent must be a
+ * not null FMAObjectAction. This function ensures that the new
+ * profile name does not already exist in the given @new_parent.
+ *
+ * This is a pure virtual function which should be implemented by
+ * the actual class. Actually, we asks for the most-derived class
+ * which implements this function.
+ *
+ * Returns: a new id suitable for this @object.
+ *
+ * Since: 2.30
+ */
+ gchar * ( *new_id )( const FMAObjectId *object, const FMAObjectId *new_parent );
+}
+ FMAObjectIdClass;
+
+GType fma_object_id_get_type ( void );
+
+gint fma_object_id_sort_alpha_asc ( const FMAObjectId *a, const FMAObjectId *b );
+gint fma_object_id_sort_alpha_desc ( const FMAObjectId *a, const FMAObjectId *b );
+
+void fma_object_id_prepare_for_paste( FMAObjectId *object, gboolean relabel, gboolean renumber,
FMAObjectId *parent );
+void fma_object_id_set_copy_of_label( FMAObjectId *object );
+void fma_object_id_set_new_id ( FMAObjectId *object, const FMAObjectId *new_parent );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_ID_H__ */
diff --git a/src/api/fma-object-item.h b/src/api/fma-object-item.h
new file mode 100644
index 0000000..dc37e77
--- /dev/null
+++ b/src/api/fma-object-item.h
@@ -0,0 +1,115 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_ITEM_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_ITEM_H__
+
+/**
+ * SECTION: object-item
+ * @title: FMAObjectItem
+ * @short_description: The Object Item Base Class Definition
+ * @include: file-manager-actions/fma-object-item.h
+ *
+ * This is a pure virtual class, i.e. not an instantiatable one, but
+ * serves as the base class for #FMAObjectAction and #FMAObjectMenu.
+ */
+
+#include "fma-object-id.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT_ITEM ( fma_object_item_get_type())
+#define FMA_OBJECT_ITEM( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ITEM,
FMAObjectItem ))
+#define FMA_OBJECT_ITEM_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT_ITEM,
FMAObjectItemClass ))
+#define FMA_IS_OBJECT_ITEM( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ITEM ))
+#define FMA_IS_OBJECT_ITEM_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT_ITEM ))
+#define FMA_OBJECT_ITEM_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_OBJECT_ITEM,
FMAObjectItemClass ))
+
+typedef struct _FMAObjectItemPrivate FMAObjectItemPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectId parent;
+ FMAObjectItemPrivate *private;
+}
+ FMAObjectItem;
+
+typedef struct _FMAObjectItemClassPrivate FMAObjectItemClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectIdClass parent;
+ FMAObjectItemClassPrivate *private;
+}
+ FMAObjectItemClass;
+
+/**
+ * FMAItemTarget:
+ * @ITEM_TARGET_SELECTION: when targeting the selection context menu.
+ * @ITEM_TARGET_LOCATION: when targeting the background context menu.
+ * @ITEM_TARGET_TOOLBAR: when targeting the toolbar.
+ * @ITEM_TARGET_ANY: a wilcard target defined in order to be able
+ * to activate an action from a keyboard shortcut,
+ * while keeping this same action hidden from the UI.
+ *
+ * The #FMAItemTarget mode is Nautilus-driven. It determines in which part
+ * of the Nautilus UI our actions will be displayed.
+ */
+typedef enum {
+ ITEM_TARGET_SELECTION = 1,
+ ITEM_TARGET_LOCATION,
+ ITEM_TARGET_TOOLBAR,
+ ITEM_TARGET_ANY
+}
+ FMAItemTarget;
+
+GType fma_object_item_get_type ( void );
+
+FMAObjectId *fma_object_item_get_item ( const FMAObjectItem *item, const gchar *id );
+gint fma_object_item_get_position ( const FMAObjectItem *item, const FMAObjectId *child );
+void fma_object_item_append_item ( FMAObjectItem *item, const FMAObjectId *child );
+void fma_object_item_insert_at ( FMAObjectItem *item, const FMAObjectId *child, gint pos
);
+void fma_object_item_insert_item ( FMAObjectItem *item, const FMAObjectId *child, const
FMAObjectId *before );
+void fma_object_item_remove_item ( FMAObjectItem *item, const FMAObjectId *child );
+
+guint fma_object_item_get_items_count ( const FMAObjectItem *item );
+
+void fma_object_item_count_items ( GList *items, gint *menus, gint *actions, gint
*profiles, gboolean recurse );
+GList *fma_object_item_copyref_items ( GList *items );
+GList *fma_object_item_free_items ( GList *items );
+
+void fma_object_item_deals_with_version ( FMAObjectItem *item );
+void fma_object_item_rebuild_children_slist( FMAObjectItem *item );
+
+gboolean fma_object_item_is_finally_writable ( const FMAObjectItem *item, guint *reason );
+void fma_object_item_set_writability_status( FMAObjectItem *item, gboolean writable, guint reason );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_ITEM_H__ */
diff --git a/src/api/fma-object-menu.h b/src/api/fma-object-menu.h
new file mode 100644
index 0000000..9c1a6f6
--- /dev/null
+++ b/src/api/fma-object-menu.h
@@ -0,0 +1,76 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_MENU_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_MENU_H__
+
+/**
+ * SECTION: object-menu
+ * @title: FMAObjectMenu
+ * @short_description: The Menu Class Definition
+ * @include: file-manager-actions/fma-object-menu.h
+ */
+
+#include "fma-object-item.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT_MENU ( fma_object_menu_get_type())
+#define FMA_OBJECT_MENU( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_MENU,
FMAObjectMenu ))
+#define FMA_OBJECT_MENU_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT_MENU,
FMAObjectMenuClass ))
+#define FMA_IS_OBJECT_MENU( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_MENU ))
+#define FMA_IS_OBJECT_MENU_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT_MENU ))
+#define FMA_OBJECT_MENU_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_OBJECT_MENU,
FMAObjectMenuClass ))
+
+typedef struct _FMAObjectMenuPrivate FMAObjectMenuPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectItem parent;
+ FMAObjectMenuPrivate *private;
+}
+ FMAObjectMenu;
+
+typedef struct _FMAObjectMenuClassPrivate FMAObjectMenuClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectItemClass parent;
+ FMAObjectMenuClassPrivate *private;
+}
+ FMAObjectMenuClass;
+
+GType fma_object_menu_get_type ( void );
+
+FMAObjectMenu *fma_object_menu_new ( void );
+FMAObjectMenu *fma_object_menu_new_with_defaults( void );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_MENU_H__ */
diff --git a/src/api/fma-object-profile.h b/src/api/fma-object-profile.h
new file mode 100644
index 0000000..87dda38
--- /dev/null
+++ b/src/api/fma-object-profile.h
@@ -0,0 +1,85 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_PROFILE_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_PROFILE_H__
+
+/**
+ * SECTION: object-profile
+ * @title: FMAObjectProfile
+ * @short_description: The Action Profile Class Definition
+ * @include: file-manager-actions/fma-object-item.h
+ */
+
+#include "fma-object-id.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT_PROFILE ( fma_object_profile_get_type())
+#define FMA_OBJECT_PROFILE( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object,
FMA_TYPE_OBJECT_PROFILE, FMAObjectProfile ))
+#define FMA_OBJECT_PROFILE_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT_PROFILE,
FMAObjectProfileClass ))
+#define FMA_IS_OBJECT_PROFILE( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_PROFILE
))
+#define FMA_IS_OBJECT_PROFILE_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT_PROFILE
))
+#define FMA_OBJECT_PROFILE_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ),
FMA_TYPE_OBJECT_PROFILE, FMAObjectProfileClass ))
+
+typedef struct _FMAObjectProfilePrivate FMAObjectProfilePrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectId parent;
+ FMAObjectProfilePrivate *private;
+}
+ FMAObjectProfile;
+
+typedef struct _FMAObjectProfileClassPrivate FMAObjectProfileClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ FMAObjectIdClass parent;
+ FMAObjectProfileClassPrivate *private;
+}
+ FMAObjectProfileClass;
+
+enum {
+ NA_EXECUTION_MODE_NORMAL = 1,
+ NA_EXECUTION_MODE_TERMINAL,
+ NA_EXECUTION_MODE_EMBEDDED,
+ NA_EXECUTION_MODE_DISPLAY_OUTPUT
+};
+
+GType fma_object_profile_get_type ( void );
+
+FMAObjectProfile *fma_object_profile_new ( void );
+FMAObjectProfile *fma_object_profile_new_with_defaults ( void );
+
+void fma_object_profile_convert_v2_to_last( FMAObjectProfile *profile );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_PROFILE_H__ */
diff --git a/src/api/fma-object.h b/src/api/fma-object.h
new file mode 100644
index 0000000..677e6d6
--- /dev/null
+++ b/src/api/fma-object.h
@@ -0,0 +1,176 @@
+/*
+ * 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 __FILE_MANAGER_ACTIONS_API_OBJECT_H__
+#define __FILE_MANAGER_ACTIONS_API_OBJECT_H__
+
+/**
+ * SECTION: object
+ * @title: FMAObject
+ * @short_description: The Deepest Base Class Definition
+ * @include: file-manager-actions/fma-object.h
+ *
+ * This is the base class of all our data object hierarchy. #FMAObject is
+ * supposed to be used as a pure virtual base class, i.e. should only be
+ * derived.
+ *
+ * All the API described here is rather private. External code should
+ * use the API described in <filename>file-manager-actions/fma-object-api.h</filename>.
+ */
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_OBJECT ( fma_object_object_get_type())
+#define FMA_OBJECT( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT, FMAObject ))
+#define FMA_OBJECT_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_OBJECT, FMAObjectClass ))
+#define FMA_IS_OBJECT( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT ))
+#define FMA_IS_OBJECT_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_OBJECT ))
+#define FMA_OBJECT_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_OBJECT,
FMAObjectClass ))
+
+typedef struct _FMAObjectPrivate FMAObjectPrivate;
+
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ FMAObjectPrivate *private;
+}
+ FMAObject;
+
+typedef struct _FMAObjectClassPrivate FMAObjectClassPrivate;
+
+/**
+ * FMAObjectClass:
+ * @dump: Dumps the #FMAObject -part of the #FMAObject -derived object.
+ * @copy: Copies a #FMAObject to another.
+ * @are_equal: Tests if two #FMAObject are equal.
+ * @is_valid: Tests if a #FMAObject is valid.
+ *
+ * The #FMAObjectClass defines some methods available to derived classes.
+ */
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+ FMAObjectClassPrivate *private;
+
+ /*< public >*/
+ /**
+ * dump:
+ * @object: the FMAObject-derived object to be dumped.
+ *
+ * Dumps via g_debug the content of the object.
+ *
+ * The derived class should call its parent class at the end of the
+ * dump of its own datas.
+ *
+ * Since: 2.30
+ */
+ void ( *dump ) ( const FMAObject *object );
+
+ /**
+ * copy:
+ * @target: the FMAObject-derived object which will receive data.
+ * @source: the FMAObject-derived object which provides data.
+ * @mode: the copy mode.
+ *
+ * Copies data and properties from @source to @target.
+ *
+ * The derived class should call its parent class at the end of the
+ * copy of its own datas.
+ *
+ * Since: 2.30
+ */
+ void ( *copy ) ( FMAObject *target, const FMAObject *source, guint mode );
+
+ /**
+ * are_equal:
+ * @a: a first FMAObject object.
+ * @b: a second FMAObject object to be compared to the first one.
+ *
+ * Compares the two objects.
+ *
+ * When testing for the modification status of an object, @a stands for
+ * the original object, while @b stands for the duplicated one.
+ *
+ * As long as no difference is detected, the derived class should call
+ * its parent class at the end of its comparison.
+ * As soon as a difference is detected, the calling sequence should
+ * be stopped, and the result returned.
+ *
+ * Returns: TRUE if @a and @b are identical, FALSE else.
+ *
+ * Since: 2.30
+ */
+ gboolean ( *are_equal )( const FMAObject *a, const FMAObject *b );
+
+ /**
+ * is_valid:
+ * @object: the FMAObject object to be checked.
+ *
+ * Checks @object for validity.
+ *
+ * A FMAObject is valid if its internal identifier is set.
+ *
+ * As long as the item is valid, the derived class should call its parent
+ * at the end of its checks.
+ * As soon as an error is detected, the calling sequence should be stopped,
+ * and the result returned.
+ *
+ * Returns: TRUE if @object is valid, FALSE else.
+ *
+ * Since: 2.30
+ */
+ gboolean ( *is_valid ) ( const FMAObject *object );
+}
+ FMAObjectClass;
+
+GType fma_object_object_get_type ( void );
+
+void fma_object_object_check_status_rec( const FMAObject *object );
+
+void fma_object_object_reset_origin ( FMAObject *object, const FMAObject *origin );
+
+FMAObject *fma_object_object_ref ( FMAObject *object );
+void fma_object_object_unref ( FMAObject *object );
+
+void fma_object_object_dump ( const FMAObject *object );
+void fma_object_object_dump_norec ( const FMAObject *object );
+void fma_object_object_dump_tree ( GList *tree );
+
+#ifdef NA_ENABLE_DEPRECATED
+GList *fma_object_get_hierarchy ( const FMAObject *object );
+void fma_object_free_hierarchy ( GList *hierarchy );
+#endif
+
+void fma_object_object_debug_invalid ( const FMAObject *object, const gchar *reason );
+
+G_END_DECLS
+
+#endif /* __FILE_MANAGER_ACTIONS_API_OBJECT_H__ */
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 9f0d347..6161e17 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -100,17 +100,17 @@ libna_core_la_SOURCES = \
na-iprefs.h \
na-module.c \
na-module.h \
- na-object.c \
- na-object-id.c \
- na-object-id-factory.c \
- na-object-item.c \
- na-object-item-factory.c \
- na-object-action.c \
- na-object-action-factory.c \
- na-object-profile.c \
- na-object-profile-factory.c \
- na-object-menu.c \
- na-object-menu-factory.c \
+ fma-object.c \
+ fma-object-id.c \
+ fma-object-id-factory.c \
+ fma-object-item.c \
+ fma-object-item-factory.c \
+ fma-object-action.c \
+ fma-object-action-factory.c \
+ fma-object-profile.c \
+ fma-object-profile-factory.c \
+ fma-object-menu.c \
+ fma-object-menu-factory.c \
na-pivot.c \
na-pivot.h \
na-selected-info.c \
diff --git a/src/core/fma-icontext.c b/src/core/fma-icontext.c
index e4f90fb..5a59941 100644
--- a/src/core/fma-icontext.c
+++ b/src/core/fma-icontext.c
@@ -48,7 +48,7 @@
#include <libnautilus-extension/nautilus-file-info.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-desktop-environment.h"
#include "na-gnome-vfs-uri.h"
@@ -301,7 +301,7 @@ fma_icontext_check_mimetypes( const FMAIContext *context )
g_return_if_fail( FMA_IS_ICONTEXT( context ));
is_all = TRUE;
- mimetypes = na_object_get_mimetypes( context );
+ mimetypes = fma_object_get_mimetypes( context );
for( im = mimetypes ; im ; im = im->next ){
if( !im->data || !strlen( im->data )){
@@ -316,7 +316,7 @@ fma_icontext_check_mimetypes( const FMAIContext *context )
/* do not break here so that we are able to check all mimetypes */
}
- na_object_set_all_mimetypes( context, is_all );
+ fma_object_set_all_mimetypes( context, is_all );
fma_core_utils_slist_free( mimetypes );
}
@@ -356,7 +356,7 @@ fma_icontext_copy( FMAIContext *context, const FMAIContext *source )
void
fma_icontext_read_done( FMAIContext *context )
{
- na_object_check_mimetypes( context );
+ fma_object_check_mimetypes( context );
}
/**
@@ -376,9 +376,9 @@ fma_icontext_set_scheme( FMAIContext *context, const gchar *scheme, gboolean sel
g_return_if_fail( FMA_IS_ICONTEXT( context ));
- schemes = na_object_get_schemes( context );
+ schemes = fma_object_get_schemes( context );
schemes = fma_core_utils_slist_setup_element( schemes, scheme, selected );
- na_object_set_schemes( context, schemes );
+ fma_object_set_schemes( context, schemes );
fma_core_utils_slist_free( schemes );
}
@@ -399,9 +399,9 @@ fma_icontext_set_only_desktop( FMAIContext *context, const gchar *desktop, gbool
g_return_if_fail( FMA_IS_ICONTEXT( context ));
- desktops = na_object_get_only_show_in( context );
+ desktops = fma_object_get_only_show_in( context );
desktops = fma_core_utils_slist_setup_element( desktops, desktop, selected );
- na_object_set_only_show_in( context, desktops );
+ fma_object_set_only_show_in( context, desktops );
fma_core_utils_slist_free( desktops );
}
@@ -422,9 +422,9 @@ fma_icontext_set_not_desktop( FMAIContext *context, const gchar *desktop, gboole
g_return_if_fail( FMA_IS_ICONTEXT( context ));
- desktops = na_object_get_not_show_in( context );
+ desktops = fma_object_get_not_show_in( context );
desktops = fma_core_utils_slist_setup_element( desktops, desktop, selected );
- na_object_set_not_show_in( context, desktops );
+ fma_object_set_not_show_in( context, desktops );
fma_core_utils_slist_free( desktops );
}
@@ -445,10 +445,10 @@ fma_icontext_replace_folder( FMAIContext *context, const gchar *old, const gchar
g_return_if_fail( FMA_IS_ICONTEXT( context ));
- folders = na_object_get_folders( context );
+ folders = fma_object_get_folders( context );
folders = fma_core_utils_slist_remove_utf8( folders, old );
folders = g_slist_append( folders, ( gpointer ) g_strdup( new ));
- na_object_set_folders( context, folders );
+ fma_object_set_folders( context, folders );
fma_core_utils_slist_free( folders );
}
@@ -477,18 +477,18 @@ is_candidate_for_target( const FMAIContext *object, guint target, GList *files )
static const gchar *thisfn = "fma_icontext_is_candidate_for_target";
gboolean ok = TRUE;
- if( NA_IS_OBJECT_ACTION( object )){
+ if( FMA_IS_OBJECT_ACTION( object )){
switch( target ){
case ITEM_TARGET_LOCATION:
- ok = na_object_is_target_location( object );
+ ok = fma_object_is_target_location( object );
break;
case ITEM_TARGET_TOOLBAR:
- ok = na_object_is_target_toolbar( object );
+ ok = fma_object_is_target_toolbar( object );
break;
case ITEM_TARGET_SELECTION:
- ok = na_object_is_target_selection( object );
+ ok = fma_object_is_target_selection( object );
break;
case ITEM_TARGET_ANY:
@@ -503,7 +503,7 @@ is_candidate_for_target( const FMAIContext *object, guint target, GList *files )
if( !ok ){
g_debug( "%s: object is not candidate because target doesn't match (asked=%d)", thisfn,
target );
- /*na_object_dump( object );*/
+ /*fma_object_dump( object );*/
}
return( ok );
@@ -518,8 +518,8 @@ is_candidate_for_show_in( const FMAIContext *object, guint target, GList *files
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_show_in";
gboolean ok = TRUE;
- GSList *only_in = na_object_get_only_show_in( object );
- GSList *not_in = na_object_get_not_show_in( object );
+ GSList *only_in = fma_object_get_only_show_in( object );
+ GSList *not_in = fma_object_get_not_show_in( object );
static gchar *environment = NULL;
/* there is a memory leak here when desktop comes from user preferences
@@ -563,7 +563,7 @@ is_candidate_for_try_exec( const FMAIContext *object, guint target, GList *files
static const gchar *thisfn = "fma_icontext_is_candidate_for_try_exec";
gboolean ok = TRUE;
GError *error = NULL;
- gchar *tryexec = na_object_get_try_exec( object );
+ gchar *tryexec = fma_object_get_try_exec( object );
if( tryexec && strlen( tryexec )){
ok = FALSE;
@@ -598,7 +598,7 @@ is_candidate_for_show_if_registered( const FMAIContext *object, guint target, GL
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_show_if_registered";
gboolean ok = TRUE;
- gchar *name = na_object_get_show_if_registered( object );
+ gchar *name = fma_object_get_show_if_registered( object );
if( name && strlen( name )){
ok = FALSE;
@@ -637,7 +637,7 @@ is_candidate_for_show_if_true( const FMAIContext *object, guint target, GList *f
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_show_if_true";
gboolean ok = TRUE;
- gchar *command = na_object_get_show_if_true( object );
+ gchar *command = fma_object_get_show_if_true( object );
if( command && strlen( command )){
ok = FALSE;
@@ -670,7 +670,7 @@ is_candidate_for_show_if_running( const FMAIContext *object, guint target, GList
glibtop_proc_state procstate;
pid_t *pid_list;
guint i;
- gchar *running = na_object_get_show_if_running( object );
+ gchar *running = fma_object_get_show_if_running( object );
if( running && strlen( running )){
ok = FALSE;
@@ -725,12 +725,12 @@ is_candidate_for_mimetypes( const FMAIContext *object, guint target, GList *file
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_mimetypes";
gboolean ok = TRUE;
- gboolean all = na_object_get_all_mimetypes( object );
+ gboolean all = fma_object_get_all_mimetypes( object );
g_debug( "%s: all=%s", thisfn, all ? "True":"False" );
if( !all ){
- GSList *mimetypes = na_object_get_mimetypes( object );
+ GSList *mimetypes = fma_object_get_mimetypes( object );
GSList *im;
GList *it;
@@ -849,11 +849,11 @@ is_candidate_for_basenames( const FMAIContext *object, guint target, GList *file
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_basenames";
gboolean ok = TRUE;
- GSList *basenames = na_object_get_basenames( object );
+ GSList *basenames = fma_object_get_basenames( object );
if( basenames ){
if( strcmp( basenames->data, "*" ) != 0 || g_slist_length( basenames ) > 1 ){
- gboolean matchcase = na_object_get_matchcase( object );
+ gboolean matchcase = fma_object_get_matchcase( object );
GSList *ib;
GList *it;
gchar *tmp;
@@ -920,7 +920,7 @@ is_candidate_for_selection_count( const FMAIContext *object, guint target, GList
gboolean ok = TRUE;
gint limit;
guint count;
- gchar *selection_count = na_object_get_selection_count( object );
+ gchar *selection_count = fma_object_get_selection_count( object );
if( selection_count && strlen( selection_count )){
limit = atoi( selection_count+1 );
@@ -966,7 +966,7 @@ is_candidate_for_schemes( const FMAIContext *object, guint target, GList *files
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_schemes";
gboolean ok = TRUE;
- GSList *schemes = na_object_get_schemes( object );
+ GSList *schemes = fma_object_get_schemes( object );
if( schemes ){
if( strcmp( schemes->data, "*" ) != 0 || g_slist_length( schemes ) > 1 ){
@@ -1049,7 +1049,7 @@ is_candidate_for_folders( const FMAIContext *object, guint target, GList *files
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_folders";
gboolean ok = TRUE;
- GSList *folders = na_object_get_folders( object );
+ GSList *folders = fma_object_get_folders( object );
if( folders ){
if( strcmp( folders->data, "/" ) != 0 || g_slist_length( folders ) > 1 ){
@@ -1112,7 +1112,7 @@ is_candidate_for_capabilities( const FMAIContext *object, guint target, GList *f
{
static const gchar *thisfn = "fma_icontext_is_candidate_for_capabilities";
gboolean ok = TRUE;
- GSList *capabilities = na_object_get_capabilities( object );
+ GSList *capabilities = fma_object_get_capabilities( object );
if( capabilities ){
GSList *ic;
@@ -1167,12 +1167,12 @@ is_valid_basenames( const FMAIContext *object )
gboolean valid;
GSList *basenames;
- basenames = na_object_get_basenames( object );
+ basenames = fma_object_get_basenames( object );
valid = basenames && g_slist_length( basenames ) > 0;
fma_core_utils_slist_free( basenames );
if( !valid ){
- na_object_debug_invalid( object, "basenames" );
+ fma_object_debug_invalid( object, "basenames" );
}
return( valid );
@@ -1193,7 +1193,7 @@ is_valid_mimetypes( const FMAIContext *object )
guint count_ok, count_errs;
const gchar *imtype;
- mimetypes = na_object_get_mimetypes( object );
+ mimetypes = fma_object_get_mimetypes( object );
count_ok = 0;
count_errs = 0;
@@ -1226,7 +1226,7 @@ is_valid_mimetypes( const FMAIContext *object )
valid = ( count_ok > 0 && count_errs == 0 );
if( !valid ){
- na_object_debug_invalid( object, "mimetypes" );
+ fma_object_debug_invalid( object, "mimetypes" );
}
fma_core_utils_slist_free( mimetypes );
@@ -1240,12 +1240,12 @@ is_valid_schemes( const FMAIContext *object )
gboolean valid;
GSList *schemes;
- schemes = na_object_get_schemes( object );
+ schemes = fma_object_get_schemes( object );
valid = schemes && g_slist_length( schemes ) > 0;
fma_core_utils_slist_free( schemes );
if( !valid ){
- na_object_debug_invalid( object, "schemes" );
+ fma_object_debug_invalid( object, "schemes" );
}
return( valid );
@@ -1257,12 +1257,12 @@ is_valid_folders( const FMAIContext *object )
gboolean valid;
GSList *folders;
- folders = na_object_get_folders( object );
+ folders = fma_object_get_folders( object );
valid = folders && g_slist_length( folders ) > 0;
fma_core_utils_slist_free( folders );
if( !valid ){
- na_object_debug_invalid( object, "folders" );
+ fma_object_debug_invalid( object, "folders" );
}
return( valid );
diff --git a/src/core/fma-iduplicable.c b/src/core/fma-iduplicable.c
index 1d86daa..7d8e560 100644
--- a/src/core/fma-iduplicable.c
+++ b/src/core/fma-iduplicable.c
@@ -145,7 +145,7 @@ interface_base_init( FMAIDuplicableInterface *klass )
* Signal args: New modification status
*
* Handler prototype:
- * void ( *handler )( FMAIDuplicable *duplicable, NAObject *object, gboolean is_modified,
gpointer user_data );
+ * void ( *handler )( FMAIDuplicable *duplicable, FMAObject *object, gboolean is_modified,
gpointer user_data );
*
* When the signal is first emitted, thus on FMAIDuplicable, @duplicable
* and @object are pointers to the same address. This duplication is
@@ -177,7 +177,7 @@ interface_base_init( FMAIDuplicableInterface *klass )
* Signal args: New validity status
*
* Handler prototype:
- * void ( *handler )( FMAIDuplicable *duplicable, NAObject *object, gboolean is_valid,
gpointer user_data );
+ * void ( *handler )( FMAIDuplicable *duplicable, FMAObject *object, gboolean is_valid,
gpointer user_data );
*
* When the signal is first emitted, thus on FMAIDuplicable, @duplicable
* and @object are pointers to the same address. This duplication is
@@ -324,8 +324,8 @@ fma_iduplicable_duplicate( const FMAIDuplicable *object, guint mode )
* fma_iduplicable_check_status() is not, as itself, recursive.
* That is, the modification and validity status are only set on the
* specified object.
- * #NAObject implementation has chosen to handle itself the recursivity:
- * na_object_check_status() so first check status for children, before
+ * #FMAObject implementation has chosen to handle itself the recursivity:
+ * fma_object_check_status() so first check status for children, before
* calling this function.
*
* Since: 2.30
diff --git a/src/core/fma-ifactory-provider.c b/src/core/fma-ifactory-provider.c
index d29a08b..7b445ed 100644
--- a/src/core/fma-ifactory-provider.c
+++ b/src/core/fma-ifactory-provider.c
@@ -166,7 +166,7 @@ ifactory_provider_get_version( const FMAIFactoryProvider *instance )
* &lcomment;
* * allocate the object to be read
* &rcomment;
- * NAObjectItem *item = NA_OBJECT_ITEM( na_object_action_new());
+ * FMAObjectItem *item = FMA_OBJECT_ITEM( fma_object_action_new());
* &lcomment;
* * some data we may need to have access to in callback methods
* &rcomment;
diff --git a/src/core/fma-iimporter.c b/src/core/fma-iimporter.c
index 110600c..9cc18c0 100644
--- a/src/core/fma-iimporter.c
+++ b/src/core/fma-iimporter.c
@@ -35,7 +35,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-iimporter.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
/* private interface data
*/
@@ -147,7 +147,7 @@ iimporter_get_version( const FMAIImporter *instance )
* @importer: this #FMAIImporter instance.
* @parms: a #FMAIImporterImportFromUriParmsv2 structure.
*
- * Tries to import a #NAObjectItem from the URI specified in @parms, returning
+ * Tries to import a #FMAObjectItem from the URI specified in @parms, returning
* the result in <structfield>@parms->imported</structfield>.
*
* Note that, starting with &prodname; 3.2, the @parms argument is no more a
@@ -219,7 +219,7 @@ fma_iimporter_manage_import_mode( FMAIImporterManageImportModeParms *parms )
{
static const gchar *thisfn = "fma_iimporter_manage_import_mode";
guint code;
- NAObjectItem *exists;
+ FMAObjectItem *exists;
guint mode;
gchar *id;
@@ -282,7 +282,7 @@ fma_iimporter_manage_import_mode( FMAIImporterManageImportModeParms *parms )
case IMPORTER_MODE_NO_IMPORT:
default:
- id = na_object_get_id( parms->imported );
+ id = fma_object_get_id( parms->imported );
fma_core_utils_slist_add_message( &parms->messages, _( "Item %s already
exists." ), id );
if( parms->asked_mode == IMPORTER_MODE_ASK ){
fma_core_utils_slist_add_message( &parms->messages, "%s", _( "Import
was canceled due to user request." ));
@@ -303,14 +303,14 @@ renumber_label_item( FMAIImporterManageImportModeParms *parms )
{
gchar *label, *tmp;
- na_object_set_new_id( parms->imported, NULL );
+ fma_object_set_new_id( parms->imported, NULL );
- label = na_object_get_label( parms->imported );
+ label = fma_object_get_label( parms->imported );
/* i18n: the action has been renumbered during import operation */
tmp = g_strdup_printf( "%s %s", label, _( "(renumbered)" ));
- na_object_set_label( parms->imported, tmp );
+ fma_object_set_label( parms->imported, tmp );
g_free( tmp );
g_free( label );
diff --git a/src/core/fma-iio-provider.c b/src/core/fma-iio-provider.c
index 89b0823..ef340ad 100644
--- a/src/core/fma-iio-provider.c
+++ b/src/core/fma-iio-provider.c
@@ -191,7 +191,7 @@ do_is_able_to_write( const FMAIIOProvider *instance )
* or action).
*
* This function may be triggered for each and every
- * #NAObjectItem -derived modified object, and should, at least, be
+ * #FMAObjectItem -derived modified object, and should, at least, be
* triggered once for a coherent set of updates.
*
* When receiving this signal, the currently running program may just
diff --git a/src/core/na-object-action-factory.c b/src/core/fma-object-action-factory.c
similarity index 97%
rename from src/core/na-object-action-factory.c
rename to src/core/fma-object-action-factory.c
index ebf66b2..992f0ac 100644
--- a/src/core/na-object-action-factory.c
+++ b/src/core/fma-object-action-factory.c
@@ -42,8 +42,8 @@
* - n/a
*/
-extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
-extern FMADataDef data_def_item []; /* defined in na-object-item-factory.c */
+extern FMADataDef data_def_id []; /* defined in fma-object-id-factory.c */
+extern FMADataDef data_def_item []; /* defined in fma-object-item-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
static FMADataDef data_def_action [] = {
@@ -208,7 +208,7 @@ static FMADataDef data_def_action [] = {
FALSE,
TRUE,
"Last allocated profile",
- "Last allocated profile number in na_object_action_get_new_profile_name(), " \
+ "Last allocated profile number in fma_object_action_get_new_profile_name(), "
\
"reset to zero when saving the action.",
FMA_DATA_TYPE_UINT,
"0",
diff --git a/src/core/na-object-action.c b/src/core/fma-object-action.c
similarity index 64%
rename from src/core/na-object-action.c
rename to src/core/fma-object-action.c
index 6adcaa4..d219297 100644
--- a/src/core/na-object-action.c
+++ b/src/core/fma-object-action.c
@@ -38,42 +38,42 @@
#include <api/fma-core-utils.h>
#include <api/fma-iio-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-factory-provider.h"
#include "na-factory-object.h"
/* private class data
*/
-struct _NAObjectActionClassPrivate {
+struct _FMAObjectActionClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectActionPrivate {
+struct _FMAObjectActionPrivate {
gboolean dispose_has_run;
};
/* i18n: default label for a new action */
#define NEW_NAUTILUS_ACTION N_( "New Nautilus action" )
-extern FMADataGroup action_data_groups []; /* defined in na-object-action-factory.c */
-extern FMADataDef data_def_action_v1 []; /* defined in na-object-action-factory.c */
+extern FMADataGroup action_data_groups []; /* defined in fma-object-action-factory.c */
+extern FMADataDef data_def_action_v1 []; /* defined in fma-object-action-factory.c */
-static NAObjectItemClass *st_parent_class = NULL;
+static FMAObjectItemClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectActionClass *klass );
+static void class_init( FMAObjectActionClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec
*spec );
static void instance_set_property( GObject *object, guint property_id, const GValue *value,
GParamSpec *spec );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void object_dump( const NAObject *object );
-static gboolean object_are_equal( const NAObject *a, const NAObject *b );
-static gboolean object_is_valid( const NAObject *object );
+static void object_dump( const FMAObject *object );
+static gboolean object_are_equal( const FMAObject *a, const FMAObject *b );
+static gboolean object_is_valid( const FMAObject *object );
static void ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data );
static guint ifactory_object_get_version( const FMAIFactoryObject *instance );
@@ -85,16 +85,16 @@ static guint ifactory_object_write_done( FMAIFactoryObject *instance, con
static void icontext_iface_init( FMAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
-static NAObjectProfile *read_done_convert_v1_to_v2( FMAIFactoryObject *instance );
+static FMAObjectProfile *read_done_convert_v1_to_v2( FMAIFactoryObject *instance );
static void read_done_deals_with_toolbar_label( FMAIFactoryObject *instance );
static guint write_done_write_profiles( FMAIFactoryObject *instance, const FMAIFactoryProvider
*writer, void *writer_data, GSList **messages );
-static gboolean is_valid_label( const NAObjectAction *action );
-static gboolean is_valid_toolbar_label( const NAObjectAction *action );
+static gboolean is_valid_label( const FMAObjectAction *action );
+static gboolean is_valid_toolbar_label( const FMAObjectAction *action );
GType
-na_object_action_get_type( void )
+fma_object_action_get_type( void )
{
static GType action_type = 0;
@@ -109,17 +109,17 @@ na_object_action_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_action_register_type";
+ static const gchar *thisfn = "fma_object_action_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectActionClass ),
+ sizeof( FMAObjectActionClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObjectAction ),
+ sizeof( FMAObjectAction ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -138,7 +138,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( NA_TYPE_OBJECT_ITEM, "NAObjectAction", &info, 0 );
+ type = g_type_register_static( FMA_TYPE_OBJECT_ITEM, "FMAObjectAction", &info, 0 );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
@@ -148,11 +148,11 @@ register_type( void )
}
static void
-class_init( NAObjectActionClass *klass )
+class_init( FMAObjectActionClass *klass )
{
- static const gchar *thisfn = "na_object_action_class_init";
+ static const gchar *thisfn = "fma_object_action_class_init";
GObjectClass *object_class;
- NAObjectClass *naobject_class;
+ FMAObjectClass *naobject_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -164,12 +164,12 @@ class_init( NAObjectActionClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- naobject_class = NA_OBJECT_CLASS( klass );
+ naobject_class = FMA_OBJECT_CLASS( klass );
naobject_class->dump = object_dump;
naobject_class->are_equal = object_are_equal;
naobject_class->is_valid = object_is_valid;
- klass->private = g_new0( NAObjectActionClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectActionClassPrivate, 1 );
na_factory_object_define_properties( object_class, action_data_groups );
}
@@ -177,26 +177,26 @@ class_init( NAObjectActionClass *klass )
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "na_object_action_instance_init";
- NAObjectAction *self;
+ static const gchar *thisfn = "fma_object_action_instance_init";
+ FMAObjectAction *self;
- g_return_if_fail( NA_IS_OBJECT_ACTION( instance ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( instance ));
- self = NA_OBJECT_ACTION( instance );
+ self = FMA_OBJECT_ACTION( instance );
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self->private = g_new0( NAObjectActionPrivate, 1 );
+ self->private = g_new0( FMAObjectActionPrivate, 1 );
}
static void
instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_ACTION( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_ACTION( object )->private->dispose_has_run ){
na_factory_object_get_as_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string( property_id
), value );
}
@@ -205,10 +205,10 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
static void
instance_set_property( GObject *object, guint property_id, const GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_ACTION( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_ACTION( object )->private->dispose_has_run ){
na_factory_object_set_from_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string(
property_id ), value );
}
@@ -217,12 +217,12 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "na_object_action_instance_dispose";
- NAObjectAction *self;
+ static const gchar *thisfn = "fma_object_action_instance_dispose";
+ FMAObjectAction *self;
- g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( object ));
- self = NA_OBJECT_ACTION( object );
+ self = FMA_OBJECT_ACTION( object );
if( !self->private->dispose_has_run ){
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
@@ -239,12 +239,12 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "na_object_action_instance_finalize";
- NAObjectAction *self;
+ static const gchar *thisfn = "fma_object_action_instance_finalize";
+ FMAObjectAction *self;
- g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( object ));
- self = NA_OBJECT_ACTION( object );
+ self = FMA_OBJECT_ACTION( object );
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
@@ -257,22 +257,22 @@ instance_finalize( GObject *object )
}
static void
-object_dump( const NAObject *object )
+object_dump( const FMAObject *object )
{
- static const char *thisfn = "na_object_action_object_dump";
- NAObjectAction *self;
+ static const char *thisfn = "fma_object_action_object_dump";
+ FMAObjectAction *self;
- g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( object ));
- self = NA_OBJECT_ACTION( object );
+ self = FMA_OBJECT_ACTION( object );
if( !self->private->dispose_has_run ){
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object
)->ref_count );
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->dump ){
- NA_OBJECT_CLASS( st_parent_class )->dump( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->dump ){
+ FMA_OBJECT_CLASS( st_parent_class )->dump( object );
}
g_debug( "+- end of dump" );
@@ -287,16 +287,16 @@ object_dump( const NAObject *object )
* considered modified as soon as one of its profile is itself modified.
*/
static gboolean
-object_are_equal( const NAObject *a, const NAObject *b )
+object_are_equal( const FMAObject *a, const FMAObject *b )
{
- static const gchar *thisfn = "na_object_action_object_are_equal";
+ static const gchar *thisfn = "fma_object_action_object_are_equal";
GList *it;
gboolean are_equal;
g_debug( "%s: a=%p, b=%p", thisfn, ( void * ) a, ( void * ) b );
- for( it = na_object_get_items( b ) ; it ; it = it->next ){
- if( na_object_is_modified( it->data )){
+ for( it = fma_object_get_items( b ) ; it ; it = it->next ){
+ if( fma_object_is_modified( it->data )){
return( FALSE );
}
}
@@ -304,46 +304,46 @@ object_are_equal( const NAObject *a, const NAObject *b )
are_equal = TRUE;
/* chain call to parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->are_equal ){
- are_equal &= NA_OBJECT_CLASS( st_parent_class )->are_equal( a, b );
+ if( FMA_OBJECT_CLASS( st_parent_class )->are_equal ){
+ are_equal &= FMA_OBJECT_CLASS( st_parent_class )->are_equal( a, b );
}
return( are_equal );
}
static gboolean
-object_is_valid( const NAObject *object )
+object_is_valid( const FMAObject *object )
{
- static const gchar *thisfn = "na_object_action_object_is_valid";
+ static const gchar *thisfn = "fma_object_action_object_is_valid";
gboolean is_valid;
- NAObjectAction *action;
+ FMAObjectAction *action;
- g_return_val_if_fail( NA_IS_OBJECT_ACTION( object ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ACTION( object ), FALSE );
is_valid = FALSE;
- action = NA_OBJECT_ACTION( object );
+ action = FMA_OBJECT_ACTION( object );
if( !action->private->dispose_has_run ){
g_debug( "%s: action=%p (%s)", thisfn, ( void * ) action, G_OBJECT_TYPE_NAME( action ));
is_valid = TRUE;
- if( na_object_is_target_toolbar( action )){
+ if( fma_object_is_target_toolbar( action )){
is_valid &= is_valid_toolbar_label( action );
}
- if( na_object_is_target_selection( action ) || na_object_is_target_location( action )){
+ if( fma_object_is_target_selection( action ) || fma_object_is_target_location( action )){
is_valid &= is_valid_label( action );
}
if( !is_valid ){
- na_object_debug_invalid( action, "no valid profile" );
+ fma_object_debug_invalid( action, "no valid profile" );
}
}
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->is_valid ){
- is_valid &= NA_OBJECT_CLASS( st_parent_class )->is_valid( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->is_valid ){
+ is_valid &= FMA_OBJECT_CLASS( st_parent_class )->is_valid( object );
}
return( is_valid );
@@ -352,7 +352,7 @@ object_is_valid( const NAObject *object )
static void
ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_action_ifactory_object_iface_init";
+ static const gchar *thisfn = "fma_object_action_ifactory_object_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -384,19 +384,19 @@ static void
ifactory_object_read_done( FMAIFactoryObject *instance, const FMAIFactoryProvider *reader, void
*reader_data, GSList **messages )
{
guint iversion;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
- g_debug( "na_object_action_ifactory_object_read_done: instance=%p", ( void * ) instance );
+ g_debug( "fma_object_action_ifactory_object_read_done: instance=%p", ( void * ) instance );
- na_object_item_deals_with_version( NA_OBJECT_ITEM( instance ));
+ fma_object_item_deals_with_version( FMA_OBJECT_ITEM( instance ));
/* should attach a new profile if we detect a pre-v2 action
* the v1_to_v2 conversion must be followed by a v2_to_v3 one
*/
- iversion = na_object_get_iversion( instance );
+ iversion = fma_object_get_iversion( instance );
if( iversion < 2 ){
profile = read_done_convert_v1_to_v2( instance );
- na_object_profile_convert_v2_to_last( profile );
+ fma_object_profile_convert_v2_to_last( profile );
}
/* deals with obsoleted data, i.e. data which may have been written in the past
@@ -416,7 +416,7 @@ ifactory_object_read_done( FMAIFactoryObject *instance, const FMAIFactoryProvide
static guint
ifactory_object_write_start( FMAIFactoryObject *instance, const FMAIFactoryProvider *writer, void
*writer_data, GSList **messages )
{
- na_object_item_rebuild_children_slist( NA_OBJECT_ITEM( instance ));
+ fma_object_item_rebuild_children_slist( FMA_OBJECT_ITEM( instance ));
return( FMA_IIO_PROVIDER_CODE_OK );
}
@@ -426,7 +426,7 @@ ifactory_object_write_done( FMAIFactoryObject *instance, const FMAIFactoryProvid
{
guint code;
- g_return_val_if_fail( NA_IS_OBJECT_ACTION( instance ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
+ g_return_val_if_fail( FMA_IS_OBJECT_ACTION( instance ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
code = write_done_write_profiles( instance, writer, writer_data, messages );
@@ -436,7 +436,7 @@ ifactory_object_write_done( FMAIFactoryObject *instance, const FMAIFactoryProvid
static void
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_action_icontext_iface_init";
+ static const gchar *thisfn = "fma_object_action_icontext_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -451,7 +451,7 @@ icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
/*
* if we have a pre-v2 action
- * any data found in data_def_action_v1 (defined in na-object-action-factory.c)
+ * any data found in data_def_action_v1 (defined in fma-object-action-factory.c)
* is obsoleted and should be moved to a new profile
*
* actions read from .desktop already have iversion=3 (cf. desktop_read_start)
@@ -459,15 +459,15 @@ icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
*
* returns the newly defined profile
*/
-static NAObjectProfile *
+static FMAObjectProfile *
read_done_convert_v1_to_v2( FMAIFactoryObject *instance )
{
- static const gchar *thisfn = "na_object_action_read_done_read_done_convert_v1_to_last";
+ static const gchar *thisfn = "fma_object_action_read_done_read_done_convert_v1_to_last";
GList *to_move;
FMADataDef *def;
FMADataBoxed *boxed;
GList *ibox;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
/* search for old data in the body: this is only possible before profiles
* because starting with contexts, iversion was written
@@ -487,10 +487,10 @@ read_done_convert_v1_to_v2( FMAIFactoryObject *instance )
/* now create a new profile
*/
- profile = na_object_profile_new();
- na_object_set_id( profile, "profile-pre-v2" );
- na_object_set_label( profile, _( "Profile automatically created from pre-v2 action" ));
- na_object_attach_profile( instance, profile );
+ profile = fma_object_profile_new();
+ fma_object_set_id( profile, "profile-pre-v2" );
+ fma_object_set_label( profile, _( "Profile automatically created from pre-v2 action" ));
+ fma_object_attach_profile( instance, profile );
for( ibox = to_move ; ibox ; ibox = ibox->next ){
na_factory_object_move_boxed(
@@ -510,16 +510,16 @@ read_done_deals_with_toolbar_label( FMAIFactoryObject *instance )
gchar *action_label;
gboolean same_label;
- toolbar_label = na_object_get_toolbar_label( instance );
- action_label = na_object_get_label( instance );
+ toolbar_label = fma_object_get_toolbar_label( instance );
+ action_label = fma_object_get_label( instance );
if( !toolbar_label || !g_utf8_strlen( toolbar_label, -1 )){
- na_object_set_toolbar_label( instance, action_label );
- na_object_set_toolbar_same_label( instance, TRUE );
+ fma_object_set_toolbar_label( instance, action_label );
+ fma_object_set_toolbar_same_label( instance, TRUE );
} else {
same_label = ( fma_core_utils_str_collate( action_label, toolbar_label ) == 0 );
- na_object_set_toolbar_same_label( instance, same_label );
+ fma_object_set_toolbar_same_label( instance, same_label );
}
g_free( action_label );
@@ -533,16 +533,16 @@ read_done_deals_with_toolbar_label( FMAIFactoryObject *instance )
static guint
write_done_write_profiles( FMAIFactoryObject *instance, const FMAIFactoryProvider *writer, void
*writer_data, GSList **messages )
{
- static const gchar *thisfn = "na_object_action_write_done_write_profiles";
+ static const gchar *thisfn = "fma_object_action_write_done_write_profiles";
guint code;
GSList *children_slist, *ic;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
code = FMA_IIO_PROVIDER_CODE_OK;
- children_slist = na_object_get_items_slist( instance );
+ children_slist = fma_object_get_items_slist( instance );
for( ic = children_slist ; ic && code == FMA_IIO_PROVIDER_CODE_OK ; ic = ic->next ){
- profile = NA_OBJECT_PROFILE( na_object_get_item( instance, ic->data ));
+ profile = FMA_OBJECT_PROFILE( fma_object_get_item( instance, ic->data ));
if( profile ){
code = fma_ifactory_provider_write_item( writer, writer_data, FMA_IFACTORY_OBJECT(
profile ), messages );
@@ -556,114 +556,114 @@ write_done_write_profiles( FMAIFactoryObject *instance, const FMAIFactoryProvide
}
static gboolean
-is_valid_label( const NAObjectAction *action )
+is_valid_label( const FMAObjectAction *action )
{
gboolean is_valid;
gchar *label;
- label = na_object_get_label( action );
+ label = fma_object_get_label( action );
is_valid = ( label && g_utf8_strlen( label, -1 ) > 0 );
g_free( label );
if( !is_valid ){
- na_object_debug_invalid( action, "label" );
+ fma_object_debug_invalid( action, "label" );
}
return( is_valid );
}
static gboolean
-is_valid_toolbar_label( const NAObjectAction *action )
+is_valid_toolbar_label( const FMAObjectAction *action )
{
gboolean is_valid;
gchar *label;
- label = na_object_get_toolbar_label( action );
+ label = fma_object_get_toolbar_label( action );
is_valid = ( label && g_utf8_strlen( label, -1 ) > 0 );
g_free( label );
if( !is_valid ){
- na_object_debug_invalid( action, "toolbar-label" );
+ fma_object_debug_invalid( action, "toolbar-label" );
}
return( is_valid );
}
/**
- * na_object_action_new:
+ * fma_object_action_new:
*
- * Allocates a new #NAObjectAction object.
+ * Allocates a new #FMAObjectAction object.
*
- * The new #NAObjectAction object is initialized with suitable default values,
+ * The new #FMAObjectAction object is initialized with suitable default values,
* but without any profile.
*
- * Returns: the newly allocated #NAObjectAction object.
+ * Returns: the newly allocated #FMAObjectAction object.
*
* Since: 2.30
*/
-NAObjectAction *
-na_object_action_new( void )
+FMAObjectAction *
+fma_object_action_new( void )
{
- NAObjectAction *action;
+ FMAObjectAction *action;
- action = g_object_new( NA_TYPE_OBJECT_ACTION, NULL );
+ action = g_object_new( FMA_TYPE_OBJECT_ACTION, NULL );
return( action );
}
/**
- * na_object_action_new_with_profile:
+ * fma_object_action_new_with_profile:
*
- * Allocates a new #NAObjectAction object along with a default profile.
+ * Allocates a new #FMAObjectAction object along with a default profile.
*
- * Returns: the newly allocated #NAObjectAction action.
+ * Returns: the newly allocated #FMAObjectAction action.
*
* Since: 2.30
*/
-NAObjectAction *
-na_object_action_new_with_profile( void )
+FMAObjectAction *
+fma_object_action_new_with_profile( void )
{
- NAObjectAction *action;
- NAObjectProfile *profile;
+ FMAObjectAction *action;
+ FMAObjectProfile *profile;
- action = na_object_action_new();
- profile = na_object_profile_new();
- na_object_attach_profile( action, profile );
+ action = fma_object_action_new();
+ profile = fma_object_profile_new();
+ fma_object_attach_profile( action, profile );
return( action );
}
/**
- * na_object_action_new_with_defaults:
+ * fma_object_action_new_with_defaults:
*
- * Allocates a new #NAObjectAction object along with a default profile.
+ * Allocates a new #FMAObjectAction object along with a default profile.
* These two objects have suitable default values.
*
- * Returns: the newly allocated #NAObjectAction action.
+ * Returns: the newly allocated #FMAObjectAction action.
*
* Since: 2.30
*/
-NAObjectAction *
-na_object_action_new_with_defaults( void )
+FMAObjectAction *
+fma_object_action_new_with_defaults( void )
{
- NAObjectAction *action;
- NAObjectProfile *profile;
+ FMAObjectAction *action;
+ FMAObjectProfile *profile;
- action = na_object_action_new();
- na_object_set_new_id( action, NULL );
- na_object_set_label( action, gettext( NEW_NAUTILUS_ACTION ));
- na_object_set_toolbar_label( action, gettext( NEW_NAUTILUS_ACTION ));
+ action = fma_object_action_new();
+ fma_object_set_new_id( action, NULL );
+ fma_object_set_label( action, gettext( NEW_NAUTILUS_ACTION ));
+ fma_object_set_toolbar_label( action, gettext( NEW_NAUTILUS_ACTION ));
na_factory_object_set_defaults( FMA_IFACTORY_OBJECT( action ));
- profile = na_object_profile_new_with_defaults();
- na_object_attach_profile( action, profile );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_attach_profile( action, profile );
return( action );
}
/**
- * na_object_action_get_new_profile_name:
- * @action: the #NAObjectAction object which will receive a new profile.
+ * fma_object_action_get_new_profile_name:
+ * @action: the #FMAObjectAction object which will receive a new profile.
*
* Returns a name suitable as a new profile name.
*
@@ -682,26 +682,26 @@ na_object_action_new_with_defaults( void )
* Since: 2.30
*/
gchar *
-na_object_action_get_new_profile_name( const NAObjectAction *action )
+fma_object_action_get_new_profile_name( const FMAObjectAction *action )
{
int i;
gboolean ok = FALSE;
gchar *candidate = NULL;
guint last_allocated;
- g_return_val_if_fail( NA_IS_OBJECT_ACTION( action ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ACTION( action ), NULL );
if( !action->private->dispose_has_run ){
- last_allocated = na_object_get_last_allocated( action );
+ last_allocated = fma_object_get_last_allocated( action );
for( i = last_allocated + 1 ; !ok ; ++i ){
g_free( candidate );
candidate = g_strdup_printf( "profile-%d", i );
- if( !na_object_get_item( action, candidate )){
+ if( !fma_object_get_item( action, candidate )){
ok = TRUE;
- na_object_set_last_allocated( action, i );
+ fma_object_set_last_allocated( action, i );
}
}
@@ -716,42 +716,42 @@ na_object_action_get_new_profile_name( const NAObjectAction *action )
}
/**
- * na_object_action_attach_profile:
- * @action: the #NAObjectAction action to which the profile will be attached.
- * @profile: the #NAObjectProfile profile to be attached to @action.
+ * fma_object_action_attach_profile:
+ * @action: the #FMAObjectAction action to which the profile will be attached.
+ * @profile: the #FMAObjectProfile profile to be attached to @action.
*
* Adds a profile at the end of the list of profiles.
*
* Since: 2.30
*/
void
-na_object_action_attach_profile( NAObjectAction *action, NAObjectProfile *profile )
+fma_object_action_attach_profile( FMAObjectAction *action, FMAObjectProfile *profile )
{
- g_return_if_fail( NA_IS_OBJECT_ACTION( action ));
- g_return_if_fail( NA_IS_OBJECT_PROFILE( profile ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( action ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( profile ));
if( !action->private->dispose_has_run ){
- na_object_append_item( action, profile );
- na_object_set_parent( profile, action );
+ fma_object_append_item( action, profile );
+ fma_object_set_parent( profile, action );
}
}
/**
- * na_object_action_set_last_version:
- * @action: the #NAObjectAction action to update.
+ * fma_object_action_set_last_version:
+ * @action: the #FMAObjectAction action to update.
*
* Set the version number of the @action to the last one.
*
* Since: 2.30
*/
void
-na_object_action_set_last_version( NAObjectAction *action )
+fma_object_action_set_last_version( FMAObjectAction *action )
{
- g_return_if_fail( NA_IS_OBJECT_ACTION( action ));
+ g_return_if_fail( FMA_IS_OBJECT_ACTION( action ));
if( !action->private->dispose_has_run ){
- na_object_set_version( action, "2.0" );
+ fma_object_set_version( action, "2.0" );
}
}
diff --git a/src/core/na-object-id-factory.c b/src/core/fma-object-id-factory.c
similarity index 92%
rename from src/core/na-object-id-factory.c
rename to src/core/fma-object-id-factory.c
index 705ebb3..04207c9 100644
--- a/src/core/na-object-id-factory.c
+++ b/src/core/fma-object-id-factory.c
@@ -49,8 +49,8 @@ FMADataDef data_def_id [] = {
FALSE,
FALSE,
TRUE,
- "NAObjectId identifier",
- "Internal identifier of the NAObjectId object. " \
+ "FMAObjectId identifier",
+ "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).",
FMA_DATA_TYPE_STRING,
@@ -75,8 +75,8 @@ FMADataDef data_def_id [] = {
FALSE,
FALSE,
TRUE,
- "NAObjectId Parent",
- "The NAObjectItem which is the parent of this object.",
+ "FMAObjectId Parent",
+ "The FMAObjectItem which is the parent of this object.",
FMA_DATA_TYPE_POINTER,
NULL,
FALSE,
diff --git a/src/core/na-object-id.c b/src/core/fma-object-id.c
similarity index 61%
rename from src/core/na-object-id.c
rename to src/core/fma-object-id.c
index 01868bd..8134bb8 100644
--- a/src/core/na-object-id.c
+++ b/src/core/fma-object-id.c
@@ -34,32 +34,32 @@
#include <glib/gi18n.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
/* private class data
*/
-struct _NAObjectIdClassPrivate {
+struct _FMAObjectIdClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectIdPrivate {
+struct _FMAObjectIdPrivate {
gboolean dispose_has_run;
};
-static NAObjectClass *st_parent_class = NULL;
+static FMAObjectClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectIdClass *klass );
+static void class_init( FMAObjectIdClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static gchar *v_new_id( const NAObjectId *object, const NAObjectId *new_parent );
+static gchar *v_new_id( const FMAObjectId *object, const FMAObjectId *new_parent );
GType
-na_object_id_get_type( void )
+fma_object_id_get_type( void )
{
static GType item_type = 0;
@@ -73,32 +73,32 @@ na_object_id_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_id_register_type";
+ static const gchar *thisfn = "fma_object_id_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectIdClass ),
+ sizeof( FMAObjectIdClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObjectId ),
+ sizeof( FMAObjectId ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( NA_TYPE_OBJECT, "NAObjectId", &info, 0 );
+ type = g_type_register_static( FMA_TYPE_OBJECT, "FMAObjectId", &info, 0 );
return( type );
}
static void
-class_init( NAObjectIdClass *klass )
+class_init( FMAObjectIdClass *klass )
{
- static const gchar *thisfn = "na_object_id_class_init";
+ static const gchar *thisfn = "fma_object_id_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -109,19 +109,19 @@ class_init( NAObjectIdClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- klass->private = g_new0( NAObjectIdClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectIdClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- NAObjectId *self;
+ FMAObjectId *self;
- g_return_if_fail( NA_IS_OBJECT_ID( instance ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( instance ));
- self = NA_OBJECT_ID( instance );
+ self = FMA_OBJECT_ID( instance );
- self->private = g_new0( NAObjectIdPrivate, 1 );
+ self->private = g_new0( FMAObjectIdPrivate, 1 );
}
/*
@@ -133,20 +133,20 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *object )
{
- NAObjectId *self;
- NAObjectItem *parent;
+ FMAObjectId *self;
+ FMAObjectItem *parent;
- g_return_if_fail( NA_IS_OBJECT_ID( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( object ));
- self = NA_OBJECT_ID( object );
+ self = FMA_OBJECT_ID( object );
if( !self->private->dispose_has_run ){
self->private->dispose_has_run = TRUE;
- parent = na_object_get_parent( object );
+ parent = fma_object_get_parent( object );
if( parent ){
- na_object_remove_item( parent, object );
+ fma_object_remove_item( parent, object );
}
self->private->dispose_has_run = TRUE;
@@ -161,11 +161,11 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- NAObjectId *self;
+ FMAObjectId *self;
- g_return_if_fail( NA_IS_OBJECT_ID( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( object ));
- self = NA_OBJECT_ID( object );
+ self = FMA_OBJECT_ID( object );
g_free( self->private );
@@ -176,9 +176,9 @@ instance_finalize( GObject *object )
}
/**
- * na_object_id_sort_alpha_asc:
- * @a: first #NAObjectId.
- * @b: second #NAObjectId.
+ * fma_object_id_sort_alpha_asc:
+ * @a: first #FMAObjectId.
+ * @b: second #FMAObjectId.
*
* Sort the objects in alphabetical ascending order of their label.
*
@@ -199,13 +199,13 @@ instance_finalize( GObject *object )
* Since: 2.30
*/
gint
-na_object_id_sort_alpha_asc( const NAObjectId *a, const NAObjectId *b )
+fma_object_id_sort_alpha_asc( const FMAObjectId *a, const FMAObjectId *b )
{
gchar *label_a, *label_b;
gint compare;
- label_a = na_object_get_label( a );
- label_b = na_object_get_label( b );
+ label_a = fma_object_get_label( a );
+ label_b = fma_object_get_label( b );
compare = fma_core_utils_str_collate( label_a, label_b );
@@ -216,9 +216,9 @@ na_object_id_sort_alpha_asc( const NAObjectId *a, const NAObjectId *b )
}
/**
- * na_object_id_sort_alpha_desc:
- * @a: first #NAObjectId.
- * @b: second #NAObjectId.
+ * fma_object_id_sort_alpha_desc:
+ * @a: first #FMAObjectId.
+ * @b: second #FMAObjectId.
*
* Sort the objects in alphabetical descending order of their label.
*
@@ -239,25 +239,25 @@ na_object_id_sort_alpha_asc( const NAObjectId *a, const NAObjectId *b )
* Since: 2.30
*/
gint
-na_object_id_sort_alpha_desc( const NAObjectId *a, const NAObjectId *b )
+fma_object_id_sort_alpha_desc( const FMAObjectId *a, const FMAObjectId *b )
{
- return( -1 * na_object_id_sort_alpha_asc( a, b ));
+ return( -1 * fma_object_id_sort_alpha_asc( a, b ));
}
/**
- * na_object_id_prepare_for_paste:
- * @object: the #NAObjectId object to be pasted.
+ * fma_object_id_prepare_for_paste:
+ * @object: the #FMAObjectId object to be pasted.
* @relabel: whether this object should be relabeled when pasted.
* @renumber: whether this item should be renumbered ?
* @parent: the parent of @object, or %NULL.
*
* Prepares @object to be pasted.
*
- * If a #NAObjectProfile, then @object is attached to the specified
- * #NAObjectAction @action. The identifier is always renumbered to be
+ * If a #FMAObjectProfile, then @object is attached to the specified
+ * #FMAObjectAction @action. The identifier is always renumbered to be
* suitable with the already existing profiles.
*
- * If a #NAObjectAction or a #NAObjectMenu, a new identifier is allocated
+ * If a #FMAObjectAction or a #FMAObjectMenu, a new identifier is allocated
* if and only if @relabel is %TRUE.
*
* Actual relabeling takes place if @relabel is %TRUE, depending of the
@@ -266,40 +266,40 @@ na_object_id_sort_alpha_desc( const NAObjectId *a, const NAObjectId *b )
* Since: 2.30
*/
void
-na_object_id_prepare_for_paste( NAObjectId *object, gboolean relabel, gboolean renumber, NAObjectId *parent )
+fma_object_id_prepare_for_paste( FMAObjectId *object, gboolean relabel, gboolean renumber, FMAObjectId
*parent )
{
- static const gchar *thisfn = "na_object_id_prepare_for_paste";
+ static const gchar *thisfn = "fma_object_id_prepare_for_paste";
GList *subitems, *it;
- g_return_if_fail( NA_IS_OBJECT_ID( object ));
- g_return_if_fail( !parent || NA_IS_OBJECT_ITEM( parent ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( object ));
+ g_return_if_fail( !parent || FMA_IS_OBJECT_ITEM( parent ));
if( !object->private->dispose_has_run ){
g_debug( "%s: object=%p, relabel=%s, renumber=%s, parent=%p",
thisfn, ( void * ) object, relabel ? "True":"False", renumber ?
"True":"False", ( void * ) parent );
- if( NA_IS_OBJECT_PROFILE( object )){
- na_object_set_parent( object, parent );
- na_object_set_new_id( object, parent );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ fma_object_set_parent( object, parent );
+ fma_object_set_new_id( object, parent );
if( renumber && relabel ){
- na_object_set_copy_of_label( object );
+ fma_object_set_copy_of_label( object );
}
} else {
if( renumber ){
- na_object_set_new_id( object, NULL );
+ fma_object_set_new_id( object, NULL );
if( relabel ){
- na_object_set_copy_of_label( object );
+ fma_object_set_copy_of_label( object );
}
- na_object_set_provider( object, NULL );
- na_object_set_provider_data( object, NULL );
- na_object_set_readonly( object, FALSE );
+ fma_object_set_provider( object, NULL );
+ fma_object_set_provider_data( object, NULL );
+ fma_object_set_readonly( object, FALSE );
}
- if( NA_IS_OBJECT_MENU( object )){
- subitems = na_object_get_items( object );
+ if( FMA_IS_OBJECT_MENU( object )){
+ subitems = fma_object_get_items( object );
for( it = subitems ; it ; it = it->next ){
- na_object_prepare_for_paste( it->data, relabel, renumber, NULL );
+ fma_object_prepare_for_paste( it->data, relabel, renumber, NULL );
}
}
}
@@ -307,28 +307,28 @@ na_object_id_prepare_for_paste( NAObjectId *object, gboolean relabel, gboolean r
}
/**
- * na_object_id_set_copy_of_label:
- * @object: the #NAObjectId object whose label is to be changed.
+ * fma_object_id_set_copy_of_label:
+ * @object: the #FMAObjectId object whose label is to be changed.
*
* Sets the 'Copy of' label.
*
* Since: 2.30
*/
void
-na_object_id_set_copy_of_label( NAObjectId *object )
+fma_object_id_set_copy_of_label( FMAObjectId *object )
{
gchar *label, *new_label;
- g_return_if_fail( NA_IS_OBJECT_ID( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( object ));
if( !object->private->dispose_has_run ){
- label = na_object_get_label( object );
+ label = fma_object_get_label( object );
/* i18n: copied items have a label as 'Copy of original label' */
new_label = g_strdup_printf( _( "Copy of %s" ), label );
- na_object_set_label( object, new_label );
+ fma_object_set_label( object, new_label );
g_free( new_label );
g_free( label );
@@ -336,11 +336,11 @@ na_object_id_set_copy_of_label( NAObjectId *object )
}
/**
- * na_object_id_set_new_id:
- * @object: the #NAObjectId object whose internal identifier is to be
+ * fma_object_id_set_new_id:
+ * @object: the #FMAObjectId object whose internal identifier is to be
* set.
- * @new_parent: if @object is a #NAObjectProfile, then @new_parent
- * should be set to the #NAObjectAction new parent. Else, it would not
+ * @new_parent: if @object is a #FMAObjectProfile, then @new_parent
+ * should be set to the #FMAObjectAction new parent. Else, it would not
* be possible to allocate a new profile id compatible with already
* existing ones.
*
@@ -349,13 +349,13 @@ na_object_id_set_copy_of_label( NAObjectId *object )
* Since: 2.30
*/
void
-na_object_id_set_new_id( NAObjectId *object, const NAObjectId *new_parent )
+fma_object_id_set_new_id( FMAObjectId *object, const FMAObjectId *new_parent )
{
- static const gchar *thisfn = "na_object_id_set_new_id";
+ static const gchar *thisfn = "fma_object_id_set_new_id";
gchar *id;
- g_return_if_fail( NA_IS_OBJECT_ID( object ));
- g_return_if_fail( !new_parent || NA_IS_OBJECT_ITEM( new_parent ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( object ));
+ g_return_if_fail( !new_parent || FMA_IS_OBJECT_ITEM( new_parent ));
if( !object->private->dispose_has_run ){
@@ -366,19 +366,19 @@ na_object_id_set_new_id( NAObjectId *object, const NAObjectId *new_parent )
id = v_new_id( object, new_parent );
if( id ){
- na_object_set_id( object, id );
+ fma_object_set_id( object, id );
g_free( id );
}
}
}
static gchar *
-v_new_id( const NAObjectId *object, const NAObjectId *new_parent )
+v_new_id( const FMAObjectId *object, const FMAObjectId *new_parent )
{
gchar *new_id = NULL;
- if( NA_OBJECT_ID_GET_CLASS( object )->new_id ){
- new_id = NA_OBJECT_ID_GET_CLASS( object )->new_id( object, new_parent );
+ if( FMA_OBJECT_ID_GET_CLASS( object )->new_id ){
+ new_id = FMA_OBJECT_ID_GET_CLASS( object )->new_id( object, new_parent );
}
return( new_id );
diff --git a/src/core/na-object-item-factory.c b/src/core/fma-object-item-factory.c
similarity index 97%
rename from src/core/na-object-item-factory.c
rename to src/core/fma-object-item-factory.c
index 11c9c77..e930223 100644
--- a/src/core/na-object-item-factory.c
+++ b/src/core/fma-object-item-factory.c
@@ -48,7 +48,7 @@
FMADataDef data_def_item [] = {
/* this data is marked as non readable as it has to be read specifically
- * in order to be able to create the corresponding NAObjectItem-derived
+ * in order to be able to create the corresponding FMAObjectItem-derived
* object
* it is not writable as different I/O providers may have different values
* for it, and thus it must be written specifically
@@ -84,8 +84,8 @@ FMADataDef data_def_item [] = {
NULL },
/* this data is common between actions and menus
- * so default value is directly set in na_object_action_new_with_defaults()
- * and na_object_menu_new_with_defaults()
+ * so default value is directly set in fma_object_action_new_with_defaults()
+ * and fma_object_menu_new_with_defaults()
*/
{ FMAFO_DATA_LABEL,
TRUE,
@@ -367,7 +367,7 @@ FMADataDef data_def_item [] = {
/* dynamic data, so non readable / non writable (but has property)
* is left at the FMAIIOProvider disposition
* not copyable as directly duplicated by FMAIIOProvider interface
- * (see NAObjectItem::object_copy)
+ * (see FMAObjectItem::object_copy)
*/
{ FMAFO_DATA_PROVIDER_DATA,
FALSE,
diff --git a/src/core/na-object-item.c b/src/core/fma-object-item.c
similarity index 56%
rename from src/core/na-object-item.c
rename to src/core/fma-object-item.c
index fc41e1d..8d2c737 100644
--- a/src/core/na-object-item.c
+++ b/src/core/fma-object-item.c
@@ -36,19 +36,19 @@
#include <uuid/uuid.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-io-provider.h"
/* private class data
*/
-struct _NAObjectItemClassPrivate {
+struct _FMAObjectItemClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectItemPrivate {
+struct _FMAObjectItemPrivate {
gboolean dispose_has_run;
/* set at load time
@@ -59,27 +59,27 @@ struct _NAObjectItemPrivate {
guint reason;
};
-static NAObjectIdClass *st_parent_class = NULL;
+static FMAObjectIdClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectItemClass *klass );
+static void class_init( FMAObjectItemClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void object_dump( const NAObject *object );
-static void object_copy( NAObject*target, const NAObject *source, guint mode );
-static gboolean object_are_equal( const NAObject *a, const NAObject *b );
-static gboolean object_is_valid( const NAObject *object );
+static void object_dump( const FMAObject *object );
+static void object_copy( FMAObject*target, const FMAObject *source, guint mode );
+static gboolean object_are_equal( const FMAObject *a, const FMAObject *b );
+static gboolean object_is_valid( const FMAObject *object );
-static gchar *object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent );
+static gchar *object_id_new_id( const FMAObjectId *item, const FMAObjectId *new_parent );
static void count_items_rec( GList *items, gint *menus, gint *actions, gint *profiles, gboolean recurse
);
-static GSList *get_children_slist( const NAObjectItem *item );
-static void copy_children( NAObjectItem *target, const NAObjectItem *source, guint mode );
+static GSList *get_children_slist( const FMAObjectItem *item );
+static void copy_children( FMAObjectItem *target, const FMAObjectItem *source, guint mode );
GType
-na_object_item_get_type( void )
+fma_object_item_get_type( void )
{
static GType item_type = 0;
@@ -93,35 +93,35 @@ na_object_item_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_item_register_type";
+ static const gchar *thisfn = "fma_object_item_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectItemClass ),
+ sizeof( FMAObjectItemClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObjectItem ),
+ sizeof( FMAObjectItem ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( NA_TYPE_OBJECT_ID, "NAObjectItem", &info, 0 );
+ type = g_type_register_static( FMA_TYPE_OBJECT_ID, "FMAObjectItem", &info, 0 );
return( type );
}
static void
-class_init( NAObjectItemClass *klass )
+class_init( FMAObjectItemClass *klass )
{
- static const gchar *thisfn = "na_object_item_class_init";
+ static const gchar *thisfn = "fma_object_item_class_init";
GObjectClass *object_class;
- NAObjectClass *naobject_class;
- NAObjectIdClass *naobjectid_class;
+ FMAObjectClass *naobject_class;
+ FMAObjectIdClass *naobjectid_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -131,28 +131,28 @@ class_init( NAObjectItemClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- naobject_class = NA_OBJECT_CLASS( klass );
+ naobject_class = FMA_OBJECT_CLASS( klass );
naobject_class->dump = object_dump;
naobject_class->copy = object_copy;
naobject_class->are_equal = object_are_equal;
naobject_class->is_valid = object_is_valid;
- naobjectid_class = NA_OBJECT_ID_CLASS( klass );
+ naobjectid_class = FMA_OBJECT_ID_CLASS( klass );
naobjectid_class->new_id = object_id_new_id;
- klass->private = g_new0( NAObjectItemClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectItemClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- NAObjectItem *self;
+ FMAObjectItem *self;
- g_return_if_fail( NA_IS_OBJECT_ITEM( instance ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( instance ));
- self = NA_OBJECT_ITEM( instance );
+ self = FMA_OBJECT_ITEM( instance );
- self->private = g_new0( NAObjectItemPrivate, 1 );
+ self->private = g_new0( FMAObjectItemPrivate, 1 );
self->private->dispose_has_run = FALSE;
self->private->writable = TRUE;
@@ -162,20 +162,20 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *object )
{
- NAObjectItem *self;
+ FMAObjectItem *self;
GList *children;
- g_return_if_fail( NA_IS_OBJECT_ITEM( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( object ));
- self = NA_OBJECT_ITEM( object );
+ self = FMA_OBJECT_ITEM( object );
if( !self->private->dispose_has_run ){
self->private->dispose_has_run = TRUE;
- children = na_object_get_items( self );
- na_object_set_items( self, NULL );
- na_object_free_items( children );
+ children = fma_object_get_items( self );
+ fma_object_set_items( self, NULL );
+ fma_object_free_items( children );
/* chain up to the parent class */
if( G_OBJECT_CLASS( st_parent_class )->dispose ){
@@ -187,11 +187,11 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- NAObjectItem *self;
+ FMAObjectItem *self;
- g_return_if_fail( NA_IS_OBJECT_ITEM( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( object ));
- self = NA_OBJECT_ITEM( object );
+ self = FMA_OBJECT_ITEM( object );
g_free( self->private );
@@ -202,14 +202,14 @@ instance_finalize( GObject *object )
}
static void
-object_dump( const NAObject *object )
+object_dump( const FMAObject *object )
{
- static const gchar *thisfn = "na_object_item_object_dump";
- NAObjectItem *item;
+ static const gchar *thisfn = "fma_object_item_object_dump";
+ FMAObjectItem *item;
- g_return_if_fail( NA_IS_OBJECT_ITEM( object ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( object ));
- item = NA_OBJECT_ITEM( object );
+ item = FMA_OBJECT_ITEM( object );
if( !item->private->dispose_has_run ){
@@ -217,34 +217,34 @@ object_dump( const NAObject *object )
g_debug( "| %s: reason=%u", thisfn, item->private->reason );
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->dump ){
- NA_OBJECT_CLASS( st_parent_class )->dump( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->dump ){
+ FMA_OBJECT_CLASS( st_parent_class )->dump( object );
}
}
}
static void
-object_copy( NAObject *target, const NAObject *source, guint mode )
+object_copy( FMAObject *target, const FMAObject *source, guint mode )
{
- static const gchar *thisfn = "na_object_item_object_copy";
+ static const gchar *thisfn = "fma_object_item_object_copy";
void *provider;
- NAObjectItem *dest, *src;
+ FMAObjectItem *dest, *src;
- g_return_if_fail( NA_IS_OBJECT_ITEM( target ));
- g_return_if_fail( NA_IS_OBJECT_ITEM( source ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( target ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( source ));
- dest = NA_OBJECT_ITEM( target );
- src = NA_OBJECT_ITEM( source );
+ dest = FMA_OBJECT_ITEM( target );
+ src = FMA_OBJECT_ITEM( source );
if( !dest->private->dispose_has_run && !src->private->dispose_has_run ){
if( mode == DUPLICATE_REC ||
- ( mode == DUPLICATE_OBJECT && G_OBJECT_TYPE( source ) == NA_TYPE_OBJECT_ACTION )){
+ ( mode == DUPLICATE_OBJECT && G_OBJECT_TYPE( source ) == FMA_TYPE_OBJECT_ACTION )){
copy_children( dest, src, mode );
}
- provider = na_object_get_provider( source );
+ provider = fma_object_get_provider( source );
if( provider ){
if( !NA_IS_IO_PROVIDER( provider )){
@@ -254,7 +254,7 @@ object_copy( NAObject *target, const NAObject *source, guint mode )
( void * ) provider );
} else {
- na_io_provider_duplicate_data( NA_IO_PROVIDER( provider ), NA_OBJECT_ITEM(
target ), NA_OBJECT_ITEM( source ), NULL );
+ na_io_provider_duplicate_data( NA_IO_PROVIDER( provider ), FMA_OBJECT_ITEM(
target ), FMA_OBJECT_ITEM( source ), NULL );
}
}
@@ -262,16 +262,16 @@ object_copy( NAObject *target, const NAObject *source, guint mode )
dest->private->reason = src->private->reason;
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->copy ){
- NA_OBJECT_CLASS( st_parent_class )->copy( target, source, mode );
+ if( FMA_OBJECT_CLASS( st_parent_class )->copy ){
+ FMA_OBJECT_CLASS( st_parent_class )->copy( target, source, mode );
}
}
}
/*
* object_are_equal:
- * @a: the first (original) #NAObjectItem instance.
- * @b: the second #NAObjectItem instance.
+ * @a: the first (original) #FMAObjectItem instance.
+ * @b: the second #FMAObjectItem instance.
*
* This function participates to the #fma_iduplicable_check_status() stack,
* and is triggered after all comparable elementary data (in #FMAIFactoryObject
@@ -283,20 +283,20 @@ object_copy( NAObject *target, const NAObject *source, guint mode )
* Returns: %TRUE if @a is equal to @b.
*/
static gboolean
-object_are_equal( const NAObject *a, const NAObject *b )
+object_are_equal( const FMAObject *a, const FMAObject *b )
{
- static const gchar *thisfn = "na_object_item_object_are_equal";
+ static const gchar *thisfn = "fma_object_item_object_are_equal";
gboolean are_equal;
- NAObjectItem *origin, *duplicate;
+ FMAObjectItem *origin, *duplicate;
GSList *a_slist, *b_slist;
gchar *a_list, *b_list;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( a ), FALSE );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( b ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( a ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( b ), FALSE );
are_equal = FALSE;
- origin = NA_OBJECT_ITEM( a );
- duplicate = NA_OBJECT_ITEM( b );
+ origin = FMA_OBJECT_ITEM( a );
+ duplicate = FMA_OBJECT_ITEM( b );
if( !origin->private->dispose_has_run &&
!duplicate->private->dispose_has_run ){
@@ -318,8 +318,8 @@ object_are_equal( const NAObject *a, const NAObject *b )
}
/* chain call to parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->are_equal ){
- are_equal &= NA_OBJECT_CLASS( st_parent_class )->are_equal( a, b );
+ if( FMA_OBJECT_CLASS( st_parent_class )->are_equal ){
+ are_equal &= FMA_OBJECT_CLASS( st_parent_class )->are_equal( a, b );
}
return( are_equal );
@@ -329,18 +329,18 @@ object_are_equal( const NAObject *a, const NAObject *b )
* must have at least one valid subitem
*/
static gboolean
-object_is_valid( const NAObject *object )
+object_is_valid( const FMAObject *object )
{
- static const gchar *thisfn = "na_object_item_object_is_valid";
+ static const gchar *thisfn = "fma_object_item_object_is_valid";
gboolean is_valid;
- NAObjectItem *item;
+ FMAObjectItem *item;
GList *children, *ic;
gint valid_children;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( object ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( object ), FALSE );
is_valid = FALSE;
- item = NA_OBJECT_ITEM( object );
+ item = FMA_OBJECT_ITEM( object );
if( !item->private->dispose_has_run ){
g_debug( "%s: item=%p (%s)", thisfn, ( void * ) item, G_OBJECT_TYPE_NAME( item ));
@@ -348,9 +348,9 @@ object_is_valid( const NAObject *object )
is_valid = TRUE;
valid_children = 0;
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
for( ic = children ; ic && !valid_children ; ic = ic->next ){
- if( na_object_is_valid( ic->data )){
+ if( fma_object_is_valid( ic->data )){
valid_children += 1;
}
}
@@ -358,13 +358,13 @@ object_is_valid( const NAObject *object )
is_valid &= ( valid_children > 0 );
if( !is_valid ){
- na_object_debug_invalid( item, "no valid child" );
+ fma_object_debug_invalid( item, "no valid child" );
}
}
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->is_valid ){
- is_valid &= NA_OBJECT_CLASS( st_parent_class )->is_valid( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->is_valid ){
+ is_valid &= FMA_OBJECT_CLASS( st_parent_class )->is_valid( object );
}
return( is_valid );
@@ -376,23 +376,23 @@ object_is_valid( const NAObject *object )
* gain to check this
*/
static gchar *
-object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent )
+object_id_new_id( const FMAObjectId *item, const FMAObjectId *new_parent )
{
GList *children, *it;
uuid_t uuid;
gchar uuid_str[64];
gchar *new_uuid = NULL;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), NULL );
- if( !NA_OBJECT_ITEM( item )->private->dispose_has_run ){
+ if( !FMA_OBJECT_ITEM( item )->private->dispose_has_run ){
- /* recurse into NAObjectItems children
+ /* recurse into FMAObjectItems children
* i.e., if a menu, recurse into embedded actions
*/
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
for( it = children ; it ; it = it->next ){
- na_object_set_new_id( it->data, new_parent );
+ fma_object_set_new_id( it->data, new_parent );
}
uuid_generate( uuid );
@@ -404,33 +404,33 @@ object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent )
}
/**
- * na_object_item_get_item:
- * @item: the #NAObjectItem from which we want retrieve a subitem.
+ * fma_object_item_get_item:
+ * @item: the #FMAObjectItem from which we want retrieve a subitem.
* @id: the id of the searched subitem.
*
- * Returns: a pointer to the #NAObjectId -derived child with the required id.
+ * Returns: a pointer to the #FMAObjectId -derived child with the required id.
*
- * The returned #NAObjectId is owned by the @item object ; the
+ * The returned #FMAObjectId is owned by the @item object ; the
* caller should not try to g_free() nor g_object_unref() it.
*
* Since: 2.30
*/
-NAObjectId *
-na_object_item_get_item( const NAObjectItem *item, const gchar *id )
+FMAObjectId *
+fma_object_item_get_item( const FMAObjectItem *item, const gchar *id )
{
GList *children, *it;
- NAObjectId *found = NULL;
- NAObjectId *isub;
+ FMAObjectId *found = NULL;
+ FMAObjectId *isub;
gchar *isubid;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), NULL );
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
for( it = children ; it && !found ; it = it->next ){
- isub = NA_OBJECT_ID( it->data );
- isubid = na_object_get_id( isub );
+ isub = FMA_OBJECT_ID( it->data );
+ isubid = fma_object_get_id( isub );
if( !strcmp( id, isubid )){
found = isub;
}
@@ -442,9 +442,9 @@ na_object_item_get_item( const NAObjectItem *item, const gchar *id )
}
/**
- * na_object_item_get_position:
- * @item: this #NAObjectItem object.
- * @child: a #NAObjectId -derived child.
+ * fma_object_item_get_position:
+ * @item: this #FMAObjectItem object.
+ * @child: a #FMAObjectId -derived child.
*
* Returns: the position of @child in the subitems list of @item,
* starting from zero, or -1 if not found.
@@ -452,13 +452,13 @@ na_object_item_get_item( const NAObjectItem *item, const gchar *id )
* Since: 2.30
*/
gint
-na_object_item_get_position( const NAObjectItem *item, const NAObjectId *child )
+fma_object_item_get_position( const FMAObjectItem *item, const FMAObjectId *child )
{
gint pos = -1;
GList *children;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), pos );
- g_return_val_if_fail( NA_IS_OBJECT_ID( child ), pos );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), pos );
+ g_return_val_if_fail( FMA_IS_OBJECT_ID( child ), pos );
if( !child ){
return( pos );
@@ -466,7 +466,7 @@ na_object_item_get_position( const NAObjectItem *item, const NAObjectId *child )
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
pos = g_list_index( children, ( gconstpointer ) child );
}
@@ -474,9 +474,9 @@ na_object_item_get_position( const NAObjectItem *item, const NAObjectId *child )
}
/**
- * na_object_item_append_item:
- * @item: the #NAObjectItem to which add the subitem.
- * @child: a #NAObjectId to be added to list of subitems.
+ * fma_object_item_append_item:
+ * @item: the #FMAObjectItem to which add the subitem.
+ * @child: a #FMAObjectId to be added to list of subitems.
*
* Appends a new @child to the list of subitems of @item,
* and setup the parent pointer of the child to its new parent.
@@ -486,30 +486,30 @@ na_object_item_get_position( const NAObjectItem *item, const NAObjectId *child )
* Since: 2.30
*/
void
-na_object_item_append_item( NAObjectItem *item, const NAObjectId *child )
+fma_object_item_append_item( FMAObjectItem *item, const FMAObjectId *child )
{
GList *children;
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
- g_return_if_fail( NA_IS_OBJECT_ID( child ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( child ));
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
if( !g_list_find( children, ( gpointer ) child )){
children = g_list_append( children, ( gpointer ) child );
- na_object_set_parent( child, item );
- na_object_set_items( item, children );
+ fma_object_set_parent( child, item );
+ fma_object_set_items( item, children );
}
}
}
/**
- * na_object_item_insert_at:
- * @item: the #NAObjectItem in which add the subitem.
- * @child: a #NAObjectId -derived to be inserted in the list of subitems.
+ * fma_object_item_insert_at:
+ * @item: the #FMAObjectItem in which add the subitem.
+ * @child: a #FMAObjectId -derived to be inserted in the list of subitems.
* @pos: the position at which the @child should be inserted.
*
* Inserts a new @child in the list of subitems of @item.
@@ -519,19 +519,19 @@ na_object_item_append_item( NAObjectItem *item, const NAObjectId *child )
* Since: 2.30
*/
void
-na_object_item_insert_at( NAObjectItem *item, const NAObjectId *child, gint pos )
+fma_object_item_insert_at( FMAObjectItem *item, const FMAObjectId *child, gint pos )
{
GList *children, *it;
gint i;
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
- g_return_if_fail( NA_IS_OBJECT_ID( child ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( child ));
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
if( pos == -1 || pos >= g_list_length( children )){
- na_object_append_item( item, child );
+ fma_object_append_item( item, child );
} else {
i = 0;
@@ -541,16 +541,16 @@ na_object_item_insert_at( NAObjectItem *item, const NAObjectId *child, gint pos
}
i += 1;
}
- na_object_set_items( item, children );
+ fma_object_set_items( item, children );
}
}
}
/**
- * na_object_item_insert_item:
- * @item: the #NAObjectItem to which add the subitem.
- * @child: a #NAObjectId to be inserted in the list of subitems.
- * @before: the #NAObjectId before which the @child should be inserted.
+ * fma_object_item_insert_item:
+ * @item: the #FMAObjectItem to which add the subitem.
+ * @child: a #FMAObjectId to be inserted in the list of subitems.
+ * @before: the #FMAObjectId before which the @child should be inserted.
*
* Inserts a new @child in the list of subitems of @item.
*
@@ -559,18 +559,18 @@ na_object_item_insert_at( NAObjectItem *item, const NAObjectId *child, gint pos
* Since: 2.30
*/
void
-na_object_item_insert_item( NAObjectItem *item, const NAObjectId *child, const NAObjectId *before )
+fma_object_item_insert_item( FMAObjectItem *item, const FMAObjectId *child, const FMAObjectId *before )
{
GList *children;
GList *before_list;
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
- g_return_if_fail( NA_IS_OBJECT_ID( child ));
- g_return_if_fail( !before || NA_IS_OBJECT_ID( before ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( child ));
+ g_return_if_fail( !before || FMA_IS_OBJECT_ID( before ));
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
if( !g_list_find( children, ( gpointer ) child )){
before_list = NULL;
@@ -585,15 +585,15 @@ na_object_item_insert_item( NAObjectItem *item, const NAObjectId *child, const N
children = g_list_prepend( children, ( gpointer ) child );
}
- na_object_set_items( item, children );
+ fma_object_set_items( item, children );
}
}
}
/**
- * na_object_item_remove_item:
- * @item: the #NAObjectItem from which the subitem must be removed.
- * @child: a #NAObjectId -derived to be removed from the list of subitems.
+ * fma_object_item_remove_item:
+ * @item: the #FMAObjectItem from which the subitem must be removed.
+ * @child: a #FMAObjectId -derived to be removed from the list of subitems.
*
* Removes a @child from the list of subitems of @item.
*
@@ -602,49 +602,49 @@ na_object_item_insert_item( NAObjectItem *item, const NAObjectId *child, const N
* Since: 2.30
*/
void
-na_object_item_remove_item( NAObjectItem *item, const NAObjectId *child )
+fma_object_item_remove_item( FMAObjectItem *item, const FMAObjectId *child )
{
GList *children;
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
- g_return_if_fail( NA_IS_OBJECT_ID( child ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( child ));
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
if( children ){
- g_debug( "na_object_item_remove_item: removing %p (%s) from %p (%s)",
+ g_debug( "fma_object_item_remove_item: removing %p (%s) from %p (%s)",
( void * ) child, G_OBJECT_TYPE_NAME( child ),
( void * ) item, G_OBJECT_TYPE_NAME( item ));
children = g_list_remove( children, ( gconstpointer ) child );
- g_debug( "na_object_item_remove_item: after: children=%p, count=%u", ( void * )
children, g_list_length( children ));
- na_object_set_items( item, children );
+ g_debug( "fma_object_item_remove_item: after: children=%p, count=%u", ( void * )
children, g_list_length( children ));
+ fma_object_set_items( item, children );
}
}
}
/**
- * na_object_item_get_items_count:
- * @item: the #NAObjectItem from which we want a count of subitems.
+ * fma_object_item_get_items_count:
+ * @item: the #FMAObjectItem from which we want a count of subitems.
*
* Returns: the count of subitems of @item.
*
* Since: 2.30
*/
guint
-na_object_item_get_items_count( const NAObjectItem *item )
+fma_object_item_get_items_count( const FMAObjectItem *item )
{
guint count = 0;
GList *children;
- /*g_debug( "na_object_item_get_items_count: item=%p (%s)", ( void * ) item, G_OBJECT_TYPE_NAME( item
));*/
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), 0 );
+ /*g_debug( "fma_object_item_get_items_count: item=%p (%s)", ( void * ) item, G_OBJECT_TYPE_NAME( item
));*/
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), 0 );
if( !item->private->dispose_has_run ){
- children = na_object_get_items( item );
+ children = fma_object_get_items( item );
count = children ? g_list_length( children ) : 0;
}
@@ -652,8 +652,8 @@ na_object_item_get_items_count( const NAObjectItem *item )
}
/**
- * na_object_item_count_items:
- * @items: a list if #NAObject -derived to be counted.
+ * fma_object_item_count_items:
+ * @items: a list if #FMAObject -derived to be counted.
* @menus: will be set to the count of menus.
* @actions: will be set to the count of actions.
* @profiles: will be set to the count of profiles.
@@ -668,7 +668,7 @@ na_object_item_get_items_count( const NAObjectItem *item )
* Since: 2.30
*/
void
-na_object_item_count_items( GList *items, gint *menus, gint *actions, gint *profiles, gboolean recurse )
+fma_object_item_count_items( GList *items, gint *menus, gint *actions, gint *profiles, gboolean recurse )
{
*menus = 0;
*actions = 0;
@@ -685,45 +685,45 @@ count_items_rec( GList *items, gint *menus, gint *actions, gint *profiles, gbool
for( it = items ; it ; it = it->next ){
if( recurse ){
- if( NA_IS_OBJECT_ITEM( it->data )){
- GList *subitems = na_object_get_items( it->data );
+ if( FMA_IS_OBJECT_ITEM( it->data )){
+ GList *subitems = fma_object_get_items( it->data );
count_items_rec( subitems, menus, actions, profiles, recurse );
}
}
- if( NA_IS_OBJECT_MENU( it->data )){
+ if( FMA_IS_OBJECT_MENU( it->data )){
*menus += 1;
- } else if( NA_IS_OBJECT_ACTION( it->data )){
+ } else if( FMA_IS_OBJECT_ACTION( it->data )){
*actions += 1;
- } else if( NA_IS_OBJECT_PROFILE( it->data )){
+ } else if( FMA_IS_OBJECT_PROFILE( it->data )){
*profiles += 1;
}
}
}
/**
- * na_object_item_copyref_items:
- * @items: a list of #NAObject -derived items.
+ * fma_object_item_copyref_items:
+ * @items: a list of #FMAObject -derived items.
*
* Creates a copy of the provided list, recursively incrementing the
- * reference count of NAObjects.
+ * reference count of FMAObjects.
*
- * Returns: the new list, which should be na_object_free_items() by the
+ * Returns: the new list, which should be fma_object_free_items() by the
* caller.
*
* Since: 3.1
*/
GList *
-na_object_item_copyref_items( GList *items )
+fma_object_item_copyref_items( GList *items )
{
GList *copy = NULL;
if( items ){
copy = g_list_copy( items );
- g_list_foreach( copy, ( GFunc ) na_object_object_ref, NULL );
- g_debug( "na_object_item_copyref_items: list at %p contains %s at %p (ref_count=%d)",
+ g_list_foreach( copy, ( GFunc ) fma_object_object_ref, NULL );
+ g_debug( "fma_object_item_copyref_items: list at %p contains %s at %p (ref_count=%d)",
( void * ) copy,
G_OBJECT_TYPE_NAME( copy->data ), ( void * ) copy->data, G_OBJECT( copy->data
)->ref_count );
}
@@ -732,8 +732,8 @@ na_object_item_copyref_items( GList *items )
}
/**
- * na_object_item_free_items:
- * @items: a list of #NAObject -derived items.
+ * fma_object_item_free_items:
+ * @items: a list of #FMAObject -derived items.
*
* Free the items list.
*
@@ -742,21 +742,21 @@ na_object_item_copyref_items( GList *items )
* Since: 3.1
*/
GList *
-na_object_item_free_items( GList *items )
+fma_object_item_free_items( GList *items )
{
if( items ){
- g_debug( "na_object_item_free_items: freeing list at %p which contains %s at %p
(ref_count=%d)",
+ g_debug( "fma_object_item_free_items: freeing list at %p which contains %s at %p
(ref_count=%d)",
( void * ) items,
G_OBJECT_TYPE_NAME( items->data ), ( void * ) items->data, G_OBJECT(
items->data )->ref_count );
- g_list_foreach( items, ( GFunc ) na_object_object_unref, NULL );
+ g_list_foreach( items, ( GFunc ) fma_object_object_unref, NULL );
g_list_free( items );
}
return( NULL );
}
/**
- * na_object_item_deals_with_version:
- * @item: this #NAObjectItem -derived object.
+ * fma_object_item_deals_with_version:
+ * @item: this #FMAObjectItem -derived object.
*
* Just after the @item has been read from FMAIFactoryProvider, setup
* the version. This is needed because some conversions may occur in
@@ -769,19 +769,19 @@ na_object_item_free_items( GList *items )
* Since: 2.30
*/
void
-na_object_item_deals_with_version( NAObjectItem *item )
+fma_object_item_deals_with_version( FMAObjectItem *item )
{
guint version_uint;
gchar *version_str;
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
if( !item->private->dispose_has_run ){
- version_uint = na_object_get_iversion( item );
+ version_uint = fma_object_get_iversion( item );
if( !version_uint ){
- version_str = na_object_get_version( item );
+ version_str = fma_object_get_version( item );
if( !version_str || !strlen( version_str )){
g_free( version_str );
@@ -789,7 +789,7 @@ na_object_item_deals_with_version( NAObjectItem *item )
}
version_uint = atoi( version_str );
- na_object_set_iversion( item, version_uint );
+ fma_object_set_iversion( item, version_uint );
g_free( version_str );
}
@@ -797,24 +797,24 @@ na_object_item_deals_with_version( NAObjectItem *item )
}
/**
- * na_object_item_rebuild_children_slist:
- * @item: this #NAObjectItem -derived object.
+ * fma_object_item_rebuild_children_slist:
+ * @item: this #FMAObjectItem -derived object.
*
* Rebuild the string list of children.
*
* Since: 2.30
*/
void
-na_object_item_rebuild_children_slist( NAObjectItem *item )
+fma_object_item_rebuild_children_slist( FMAObjectItem *item )
{
GSList *slist;
- na_object_set_items_slist( item, NULL );
+ fma_object_set_items_slist( item, NULL );
if( !item->private->dispose_has_run ){
slist = get_children_slist( item );
- na_object_set_items_slist( item, slist );
+ fma_object_set_items_slist( item, slist );
fma_core_utils_slist_free( slist );
}
}
@@ -822,17 +822,17 @@ na_object_item_rebuild_children_slist( NAObjectItem *item )
/*
*/
static GSList *
-get_children_slist( const NAObjectItem *item )
+get_children_slist( const FMAObjectItem *item )
{
GSList *slist;
GList *subitems, *it;
gchar *id;
slist = NULL;
- subitems = na_object_get_items( item );
+ subitems = fma_object_get_items( item );
for( it = subitems ; it ; it = it->next ){
- id = na_object_get_id( it->data );
+ id = fma_object_get_id( it->data );
slist = g_slist_prepend( slist, id );
}
@@ -844,13 +844,13 @@ get_children_slist( const NAObjectItem *item )
* or mode is 'duplicate object' and this is an action with profiles
*/
static void
-copy_children( NAObjectItem *target, const NAObjectItem *source, guint mode )
+copy_children( FMAObjectItem *target, const FMAObjectItem *source, guint mode )
{
- static const gchar *thisfn = "na_object_item_copy_children";
+ static const gchar *thisfn = "fma_object_item_copy_children";
GList *tgt_children, *src_children, *ic;
- NAObject *dup;
+ FMAObject *dup;
- tgt_children = na_object_get_items( target );
+ tgt_children = fma_object_get_items( target );
if( tgt_children ){
g_warning( "%s: target_children=%p (count=%d)",
thisfn,
@@ -858,21 +858,21 @@ copy_children( NAObjectItem *target, const NAObjectItem *source, guint mode )
g_return_if_fail( tgt_children == NULL );
}
- src_children = na_object_get_items( source );
+ src_children = fma_object_get_items( source );
for( ic = src_children ; ic ; ic = ic->next ){
- dup = ( NAObject * ) na_object_duplicate( ic->data, mode );
- na_object_set_parent( dup, target );
+ dup = ( FMAObject * ) fma_object_duplicate( ic->data, mode );
+ fma_object_set_parent( dup, target );
tgt_children = g_list_prepend( tgt_children, dup );
}
tgt_children = g_list_reverse( tgt_children );
- na_object_set_items( target, tgt_children );
+ fma_object_set_items( target, tgt_children );
}
/**
- * na_object_item_is_finally_writable:
- * @item: this #NAObjectItem -derived object.
+ * fma_object_item_is_finally_writable:
+ * @item: this #FMAObjectItem -derived object.
* @reason: if not %NULL, a pointer to a guint which will hold the reason code.
*
* Returns: the writability status of the @item.
@@ -880,14 +880,14 @@ copy_children( NAObjectItem *target, const NAObjectItem *source, guint mode )
* Since: 3.1
*/
gboolean
-na_object_item_is_finally_writable( const NAObjectItem *item, guint *reason )
+fma_object_item_is_finally_writable( const FMAObjectItem *item, guint *reason )
{
gboolean writable;
if( reason ){
*reason = FMA_IIO_PROVIDER_STATUS_UNDETERMINED;
}
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), FALSE );
writable = FALSE;
@@ -903,8 +903,8 @@ na_object_item_is_finally_writable( const NAObjectItem *item, guint *reason )
}
/**
- * na_object_item_set_writability_status:
- * @item: this #NAObjectItem -derived object.
+ * fma_object_item_set_writability_status:
+ * @item: this #FMAObjectItem -derived object.
* @writable: whether the item is finally writable.
* @reason: the reason code.
*
@@ -913,9 +913,9 @@ na_object_item_is_finally_writable( const NAObjectItem *item, guint *reason )
* Since: 3.1
*/
void
-na_object_item_set_writability_status( NAObjectItem *item, gboolean writable, guint reason )
+fma_object_item_set_writability_status( FMAObjectItem *item, gboolean writable, guint reason )
{
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
if( !item->private->dispose_has_run ){
diff --git a/src/core/na-object-menu-factory.c b/src/core/fma-object-menu-factory.c
similarity index 91%
rename from src/core/na-object-menu-factory.c
rename to src/core/fma-object-menu-factory.c
index fac3bb7..3885ba5 100644
--- a/src/core/na-object-menu-factory.c
+++ b/src/core/fma-object-menu-factory.c
@@ -35,8 +35,8 @@
#include <api/fma-data-def.h>
#include <api/fma-data-types.h>
-extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
-extern FMADataDef data_def_item []; /* defined in na-object-item-factory.c */
+extern FMADataDef data_def_id []; /* defined in fma-object-id-factory.c */
+extern FMADataDef data_def_item []; /* defined in fma-object-item-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
/*
diff --git a/src/core/na-object-menu.c b/src/core/fma-object-menu.c
similarity index 73%
rename from src/core/na-object-menu.c
rename to src/core/fma-object-menu.c
index b36c6f6..0c961cc 100644
--- a/src/core/na-object-menu.c
+++ b/src/core/fma-object-menu.c
@@ -36,20 +36,20 @@
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-object.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-factory-provider.h"
#include "na-factory-object.h"
/* private class data
*/
-struct _NAObjectMenuClassPrivate {
+struct _FMAObjectMenuClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectMenuPrivate {
+struct _FMAObjectMenuPrivate {
gboolean dispose_has_run;
};
@@ -58,17 +58,17 @@ struct _NAObjectMenuPrivate {
extern FMADataGroup menu_data_groups []; /* defined in na-item-menu-factory.c */
-static NAObjectItemClass *st_parent_class = NULL;
+static FMAObjectItemClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectMenuClass *klass );
+static void class_init( FMAObjectMenuClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec
*spec );
static void instance_set_property( GObject *object, guint property_id, const GValue *value,
GParamSpec *spec );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void object_dump( const NAObject *object );
+static void object_dump( const FMAObject *object );
static void ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data );
static guint ifactory_object_get_version( const FMAIFactoryObject *instance );
@@ -81,7 +81,7 @@ static void icontext_iface_init( FMAIContextInterface *iface, void *user
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
GType
-na_object_menu_get_type( void )
+fma_object_menu_get_type( void )
{
static GType menu_type = 0;
@@ -96,17 +96,17 @@ na_object_menu_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_menu_register_type";
+ static const gchar *thisfn = "fma_object_menu_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectMenuClass ),
+ sizeof( FMAObjectMenuClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObjectMenu ),
+ sizeof( FMAObjectMenu ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -125,7 +125,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( NA_TYPE_OBJECT_ITEM, "NAObjectMenu", &info, 0 );
+ type = g_type_register_static( FMA_TYPE_OBJECT_ITEM, "FMAObjectMenu", &info, 0 );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
@@ -135,11 +135,11 @@ register_type( void )
}
static void
-class_init( NAObjectMenuClass *klass )
+class_init( FMAObjectMenuClass *klass )
{
- static const gchar *thisfn = "na_object_menu_class_init";
+ static const gchar *thisfn = "fma_object_menu_class_init";
GObjectClass *object_class;
- NAObjectClass *naobject_class;
+ FMAObjectClass *naobject_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -151,10 +151,10 @@ class_init( NAObjectMenuClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- naobject_class = NA_OBJECT_CLASS( klass );
+ naobject_class = FMA_OBJECT_CLASS( klass );
naobject_class->dump = object_dump;
- klass->private = g_new0( NAObjectMenuClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectMenuClassPrivate, 1 );
na_factory_object_define_properties( object_class, menu_data_groups );
}
@@ -162,26 +162,26 @@ class_init( NAObjectMenuClass *klass )
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "na_object_menu_instance_init";
- NAObjectMenu *self;
+ static const gchar *thisfn = "fma_object_menu_instance_init";
+ FMAObjectMenu *self;
- g_return_if_fail( NA_IS_OBJECT_MENU( instance ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( instance ));
- self = NA_OBJECT_MENU( instance );
+ self = FMA_OBJECT_MENU( instance );
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self->private = g_new0( NAObjectMenuPrivate, 1 );
+ self->private = g_new0( FMAObjectMenuPrivate, 1 );
}
static void
instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_MENU( object ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_MENU( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_MENU( object )->private->dispose_has_run ){
na_factory_object_get_as_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string( property_id
), value );
}
@@ -190,10 +190,10 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
static void
instance_set_property( GObject *object, guint property_id, const GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_MENU( object ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_MENU( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_MENU( object )->private->dispose_has_run ){
na_factory_object_set_from_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string(
property_id ), value );
}
@@ -202,12 +202,12 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "na_object_menu_instance_dispose";
- NAObjectMenu *self;
+ static const gchar *thisfn = "fma_object_menu_instance_dispose";
+ FMAObjectMenu *self;
- g_return_if_fail( NA_IS_OBJECT_MENU( object ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( object ));
- self = NA_OBJECT_MENU( object );
+ self = FMA_OBJECT_MENU( object );
if( !self->private->dispose_has_run ){
@@ -225,12 +225,12 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "na_object_menu_instance_finalize";
- NAObjectMenu *self;
+ static const gchar *thisfn = "fma_object_menu_instance_finalize";
+ FMAObjectMenu *self;
- g_return_if_fail( NA_IS_OBJECT_MENU( object ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( object ));
- self = NA_OBJECT_MENU( object );
+ self = FMA_OBJECT_MENU( object );
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
@@ -243,22 +243,22 @@ instance_finalize( GObject *object )
}
static void
-object_dump( const NAObject *object )
+object_dump( const FMAObject *object )
{
- static const char *thisfn = "na_object_menu_object_dump";
- NAObjectMenu *self;
+ static const char *thisfn = "fma_object_menu_object_dump";
+ FMAObjectMenu *self;
- g_return_if_fail( NA_IS_OBJECT_MENU( object ));
+ g_return_if_fail( FMA_IS_OBJECT_MENU( object ));
- self = NA_OBJECT_MENU( object );
+ self = FMA_OBJECT_MENU( object );
if( !self->private->dispose_has_run ){
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object
)->ref_count );
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->dump ){
- NA_OBJECT_CLASS( st_parent_class )->dump( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->dump ){
+ FMA_OBJECT_CLASS( st_parent_class )->dump( object );
}
g_debug( "+- end of dump" );
@@ -268,7 +268,7 @@ object_dump( const NAObject *object )
static void
ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_menu_ifactory_object_iface_init";
+ static const gchar *thisfn = "fma_object_menu_ifactory_object_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -294,9 +294,9 @@ ifactory_object_get_groups( const FMAIFactoryObject *instance )
static void
ifactory_object_read_done( FMAIFactoryObject *instance, const FMAIFactoryProvider *reader, void
*reader_data, GSList **messages )
{
- g_debug( "na_object_menu_ifactory_object_read_done: instance=%p", ( void * ) instance );
+ g_debug( "fma_object_menu_ifactory_object_read_done: instance=%p", ( void * ) instance );
- na_object_item_deals_with_version( NA_OBJECT_ITEM( instance ));
+ fma_object_item_deals_with_version( FMA_OBJECT_ITEM( instance ));
/* prepare the context after the reading
*/
@@ -310,7 +310,7 @@ ifactory_object_read_done( FMAIFactoryObject *instance, const FMAIFactoryProvide
static guint
ifactory_object_write_start( FMAIFactoryObject *instance, const FMAIFactoryProvider *writer, void
*writer_data, GSList **messages )
{
- na_object_item_rebuild_children_slist( NA_OBJECT_ITEM( instance ));
+ fma_object_item_rebuild_children_slist( FMA_OBJECT_ITEM( instance ));
return( FMA_IIO_PROVIDER_CODE_OK );
}
@@ -324,7 +324,7 @@ ifactory_object_write_done( FMAIFactoryObject *instance, const FMAIFactoryProvid
static void
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_menu_icontext_iface_init";
+ static const gchar *thisfn = "fma_object_menu_icontext_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -338,39 +338,39 @@ icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
}
/**
- * na_object_menu_new:
+ * fma_object_menu_new:
*
- * Allocates a new #NAObjectMenu object.
+ * Allocates a new #FMAObjectMenu object.
*
- * Returns: the newly allocated #NAObjectMenu object.
+ * Returns: the newly allocated #FMAObjectMenu object.
*
* Since: 2.30
*/
-NAObjectMenu *
-na_object_menu_new( void )
+FMAObjectMenu *
+fma_object_menu_new( void )
{
- NAObjectMenu *menu;
+ FMAObjectMenu *menu;
- menu = g_object_new( NA_TYPE_OBJECT_MENU, NULL );
+ menu = g_object_new( FMA_TYPE_OBJECT_MENU, NULL );
return( menu );
}
/**
- * na_object_menu_new_with_defaults:
+ * fma_object_menu_new_with_defaults:
*
- * Allocates a new #NAObjectMenu object, and setup default values.
+ * Allocates a new #FMAObjectMenu object, and setup default values.
*
- * Returns: the newly allocated #NAObjectMenu object.
+ * Returns: the newly allocated #FMAObjectMenu object.
*
* Since: 2.30
*/
-NAObjectMenu *
-na_object_menu_new_with_defaults( void )
+FMAObjectMenu *
+fma_object_menu_new_with_defaults( void )
{
- NAObjectMenu *menu = na_object_menu_new();
- na_object_set_new_id( menu, NULL );
- na_object_set_label( menu, gettext( NEW_NAUTILUS_MENU ));
+ FMAObjectMenu *menu = fma_object_menu_new();
+ fma_object_set_new_id( menu, NULL );
+ fma_object_set_label( menu, gettext( NEW_NAUTILUS_MENU ));
na_factory_object_set_defaults( FMA_IFACTORY_OBJECT( menu ));
return( menu );
diff --git a/src/core/na-object-profile-factory.c b/src/core/fma-object-profile-factory.c
similarity index 99%
rename from src/core/na-object-profile-factory.c
rename to src/core/fma-object-profile-factory.c
index a108108..165a9df 100644
--- a/src/core/na-object-profile-factory.c
+++ b/src/core/fma-object-profile-factory.c
@@ -37,7 +37,7 @@
#include <api/fma-data-def.h>
#include <api/fma-data-types.h>
-extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
+extern FMADataDef data_def_id []; /* defined in fma-object-id-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
static FMADataDef data_def_profile [] = {
diff --git a/src/core/na-object-profile.c b/src/core/fma-object-profile.c
similarity index 71%
rename from src/core/na-object-profile.c
rename to src/core/fma-object-profile.c
index 923abd2..6e690ef 100644
--- a/src/core/na-object-profile.c
+++ b/src/core/fma-object-profile.c
@@ -39,7 +39,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-object.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-factory-provider.h"
#include "na-factory-object.h"
@@ -48,36 +48,36 @@
/* private class data
*/
-struct _NAObjectProfileClassPrivate {
+struct _FMAObjectProfileClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectProfilePrivate {
+struct _FMAObjectProfilePrivate {
gboolean dispose_has_run;
};
#define PROFILE_NAME_PREFIX "profile-"
-#define na_object_is_file( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ISFILE )))
-#define na_object_is_dir( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ISDIR )))
-#define na_object_is_multiple( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MULTIPLE )))
+#define fma_object_is_file( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ISFILE )))
+#define fma_object_is_dir( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_ISDIR )))
+#define fma_object_is_multiple( obj ) (( gboolean ) GPOINTER_TO_UINT(
fma_ifactory_object_get_as_void( FMA_IFACTORY_OBJECT( obj ), FMAFO_DATA_MULTIPLE )))
extern FMADataGroup profile_data_groups []; /* defined in na-item-profile-factory.c */
-static NAObjectIdClass *st_parent_class = NULL;
+static FMAObjectIdClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectProfileClass *klass );
+static void class_init( FMAObjectProfileClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec
*spec );
static void instance_set_property( GObject *object, guint property_id, const GValue *value,
GParamSpec *spec );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void object_dump( const NAObject *object );
-static gboolean object_is_valid( const NAObject *object );
+static void object_dump( const FMAObject *object );
+static gboolean object_is_valid( const FMAObject *object );
static void ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data );
static guint ifactory_object_get_version( const FMAIFactoryObject *instance );
@@ -88,18 +88,18 @@ static guint ifactory_object_write_done( FMAIFactoryObject *instance, con
static void icontext_iface_init( FMAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
-static gboolean convert_pre_v3_parameters( NAObjectProfile *profile );
+static gboolean convert_pre_v3_parameters( FMAObjectProfile *profile );
static gboolean convert_pre_v3_parameters_str( gchar *str );
-static gboolean convert_pre_v3_multiple( NAObjectProfile *profile );
-static gboolean convert_pre_v3_isfiledir( NAObjectProfile *profile );
-static void read_done_ending( NAObjectProfile *profile );
-static void split_path_parameters( NAObjectProfile *profile );
-static gboolean is_valid_path_parameters( const NAObjectProfile *profile );
+static gboolean convert_pre_v3_multiple( FMAObjectProfile *profile );
+static gboolean convert_pre_v3_isfiledir( FMAObjectProfile *profile );
+static void read_done_ending( FMAObjectProfile *profile );
+static void split_path_parameters( FMAObjectProfile *profile );
+static gboolean is_valid_path_parameters( const FMAObjectProfile *profile );
-static gchar *object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent );
+static gchar *object_id_new_id( const FMAObjectId *item, const FMAObjectId *new_parent );
GType
-na_object_profile_get_type( void )
+fma_object_profile_get_type( void )
{
static GType object_type = 0;
@@ -113,17 +113,17 @@ na_object_profile_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_profile_register_type";
+ static const gchar *thisfn = "fma_object_profile_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectProfileClass ),
+ sizeof( FMAObjectProfileClass ),
( GBaseInitFunc ) NULL,
( GBaseFinalizeFunc ) NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObjectProfile ),
+ sizeof( FMAObjectProfile ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -142,7 +142,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( NA_TYPE_OBJECT_ID, "NAObjectProfile", &info, 0 );
+ type = g_type_register_static( FMA_TYPE_OBJECT_ID, "FMAObjectProfile", &info, 0 );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
@@ -152,12 +152,12 @@ register_type( void )
}
static void
-class_init( NAObjectProfileClass *klass )
+class_init( FMAObjectProfileClass *klass )
{
- static const gchar *thisfn = "na_object_profile_class_init";
+ static const gchar *thisfn = "fma_object_profile_class_init";
GObjectClass *object_class;
- NAObjectClass *naobject_class;
- NAObjectIdClass *naobjectid_class;
+ FMAObjectClass *naobject_class;
+ FMAObjectIdClass *naobjectid_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -169,14 +169,14 @@ class_init( NAObjectProfileClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- naobject_class = NA_OBJECT_CLASS( klass );
+ naobject_class = FMA_OBJECT_CLASS( klass );
naobject_class->dump = object_dump;
naobject_class->is_valid = object_is_valid;
- naobjectid_class = NA_OBJECT_ID_CLASS( klass );
+ naobjectid_class = FMA_OBJECT_ID_CLASS( klass );
naobjectid_class->new_id = object_id_new_id;
- klass->private = g_new0( NAObjectProfileClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectProfileClassPrivate, 1 );
na_factory_object_define_properties( object_class, profile_data_groups );
}
@@ -184,17 +184,17 @@ class_init( NAObjectProfileClass *klass )
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "na_object_profile_instance_init";
- NAObjectProfile *self;
+ static const gchar *thisfn = "fma_object_profile_instance_init";
+ FMAObjectProfile *self;
- g_return_if_fail( NA_IS_OBJECT_PROFILE( instance ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( instance ));
- self = NA_OBJECT_PROFILE( instance );
+ self = FMA_OBJECT_PROFILE( instance );
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self->private = g_new0( NAObjectProfilePrivate, 1 );
+ self->private = g_new0( FMAObjectProfilePrivate, 1 );
self->private->dispose_has_run = FALSE;
}
@@ -202,10 +202,10 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_get_property( GObject *object, guint property_id, GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_PROFILE( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_PROFILE( object )->private->dispose_has_run ){
na_factory_object_get_as_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string( property_id
), value );
}
@@ -214,10 +214,10 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
static void
instance_set_property( GObject *object, guint property_id, const GValue *value, GParamSpec *spec )
{
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
- if( !NA_OBJECT_PROFILE( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT_PROFILE( object )->private->dispose_has_run ){
na_factory_object_set_from_value( FMA_IFACTORY_OBJECT( object ), g_quark_to_string(
property_id ), value );
}
@@ -226,12 +226,12 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "na_object_profile_instance_dispose";
- NAObjectProfile *self;
+ static const gchar *thisfn = "fma_object_profile_instance_dispose";
+ FMAObjectProfile *self;
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
- self = NA_OBJECT_PROFILE( object );
+ self = FMA_OBJECT_PROFILE( object );
if( !self->private->dispose_has_run ){
@@ -249,12 +249,12 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "na_object_profile_instance_finalize";
- NAObjectProfile *self;
+ static const gchar *thisfn = "fma_object_profile_instance_finalize";
+ FMAObjectProfile *self;
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
- self = NA_OBJECT_PROFILE( object );
+ self = FMA_OBJECT_PROFILE( object );
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
@@ -267,22 +267,22 @@ instance_finalize( GObject *object )
}
static void
-object_dump( const NAObject *object )
+object_dump( const FMAObject *object )
{
- static const char *thisfn = "na_object_profile_object_dump";
- NAObjectProfile *self;
+ static const char *thisfn = "fma_object_profile_object_dump";
+ FMAObjectProfile *self;
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
- self = NA_OBJECT_PROFILE( object );
+ self = FMA_OBJECT_PROFILE( object );
if( !self->private->dispose_has_run ){
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object
)->ref_count );
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->dump ){
- NA_OBJECT_CLASS( st_parent_class )->dump( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->dump ){
+ FMA_OBJECT_CLASS( st_parent_class )->dump( object );
}
g_debug( "+- end of dump" );
@@ -290,16 +290,16 @@ object_dump( const NAObject *object )
}
static gboolean
-object_is_valid( const NAObject *object )
+object_is_valid( const FMAObject *object )
{
- static const gchar *thisfn = "na_object_profile_object_is_valid";
+ static const gchar *thisfn = "fma_object_profile_object_is_valid";
gboolean is_valid;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
- g_return_val_if_fail( NA_IS_OBJECT_PROFILE( object ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( object ), FALSE );
is_valid = FALSE;
- profile = NA_OBJECT_PROFILE( object );
+ profile = FMA_OBJECT_PROFILE( object );
if( !profile->private->dispose_has_run ){
g_debug( "%s: profile=%p (%s)", thisfn, ( void * ) profile, G_OBJECT_TYPE_NAME( profile ));
@@ -307,8 +307,8 @@ object_is_valid( const NAObject *object )
is_valid = is_valid_path_parameters( profile );
/* chain up to the parent class */
- if( NA_OBJECT_CLASS( st_parent_class )->is_valid ){
- is_valid &= NA_OBJECT_CLASS( st_parent_class )->is_valid( object );
+ if( FMA_OBJECT_CLASS( st_parent_class )->is_valid ){
+ is_valid &= FMA_OBJECT_CLASS( st_parent_class )->is_valid( object );
}
}
@@ -318,7 +318,7 @@ object_is_valid( const NAObject *object )
static void
ifactory_object_iface_init( FMAIFactoryObjectInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_profile_ifactory_object_iface_init";
+ static const gchar *thisfn = "fma_object_profile_ifactory_object_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -343,25 +343,25 @@ ifactory_object_get_groups( const FMAIFactoryObject *instance )
static void
ifactory_object_read_done( FMAIFactoryObject *instance, const FMAIFactoryProvider *reader, void
*reader_data, GSList **messages )
{
- static const gchar *thisfn = "na_object_profile_ifactory_object_read_done";
- NAObjectAction *action;
+ static const gchar *thisfn = "fma_object_profile_ifactory_object_read_done";
+ FMAObjectAction *action;
guint iversion;
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
/* converts pre-v3 data
*/
- action = NA_OBJECT_ACTION( na_object_get_parent( instance ));
- iversion = na_object_get_iversion( action );
+ action = FMA_OBJECT_ACTION( fma_object_get_parent( instance ));
+ iversion = fma_object_get_iversion( action );
g_debug( "%s: iversion=%d", thisfn, iversion );
if( iversion < 3 ){
- na_object_profile_convert_v2_to_last( NA_OBJECT_PROFILE( instance ));
+ fma_object_profile_convert_v2_to_last( FMA_OBJECT_PROFILE( instance ));
/* must be always called, but is called when converting profile, anyway
*/
} else {
- read_done_ending( NA_OBJECT_PROFILE( instance ));
+ read_done_ending( FMA_OBJECT_PROFILE( instance ));
}
}
@@ -374,7 +374,7 @@ ifactory_object_write_done( FMAIFactoryObject *instance, const FMAIFactoryProvid
static void
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_profile_icontext_iface_init";
+ static const gchar *thisfn = "fma_object_profile_icontext_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -426,36 +426,36 @@ icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
* simultaneously introduced.
*
* As a recall of the dynamics of the reading when loading an action:
- * - na_object_action_read_done: set action defaults
+ * - fma_object_action_read_done: set action defaults
* - nagp_reader_read_done: read profiles
* > nagp_reader_read_start: attach profile to its parent
- * > na_object_profile_read_done: convert old parameters
+ * > fma_object_profile_read_done: convert old parameters
*
* So, when converting v2 to v3 parameters in a v2 profile,
* action already has its default values (including iversion=3)
*/
static gboolean
-convert_pre_v3_parameters( NAObjectProfile *profile )
+convert_pre_v3_parameters( FMAObjectProfile *profile )
{
- static const gchar *thisfn = "na_object_profile_convert_pre_v3_parameters";
+ static const gchar *thisfn = "fma_object_profile_convert_pre_v3_parameters";
gboolean path_changed, parms_changed;
gchar *before;
- gchar *path = na_object_get_path( profile );
+ gchar *path = fma_object_get_path( profile );
before = g_strdup( path );
path_changed = convert_pre_v3_parameters_str( path );
if( path_changed ){
- na_object_set_path( profile, path );
+ fma_object_set_path( profile, path );
g_debug( "%s: path=%s changed to %s", thisfn, before, path );
}
g_free( before );
g_free( path );
- gchar *parms = na_object_get_parameters( profile );
+ gchar *parms = fma_object_get_parameters( profile );
before = g_strdup( parms );
parms_changed = convert_pre_v3_parameters_str( parms );
if( parms_changed ){
- na_object_set_parameters( profile, parms );
+ fma_object_set_parameters( profile, parms );
g_debug( "%s: parameters=%s changed to %s", thisfn, before, parms );
}
g_free( before );
@@ -534,15 +534,15 @@ convert_pre_v3_parameters_str( gchar *str )
* to selection_count>0
*/
static gboolean
-convert_pre_v3_multiple( NAObjectProfile *profile )
+convert_pre_v3_multiple( FMAObjectProfile *profile )
{
- static const gchar *thisfn = "na_object_profile_convert_pre_v3_multiple";
+ static const gchar *thisfn = "fma_object_profile_convert_pre_v3_multiple";
gboolean accept_multiple;
gchar *selection_count;
- accept_multiple = na_object_is_multiple( profile );
+ accept_multiple = fma_object_is_multiple( profile );
selection_count = g_strdup( accept_multiple ? ">0" : "=1" );
- na_object_set_selection_count( profile, selection_count );
+ fma_object_set_selection_count( profile, selection_count );
g_debug( "%s: accept_multiple=%s changed to selection_count= %s",
thisfn, accept_multiple ? "True":"False", selection_count );
g_free( selection_count );
@@ -562,9 +562,9 @@ convert_pre_v3_multiple( NAObjectProfile *profile )
* contrarily all/allfiles mimetype has to be checked separately.
*/
static gboolean
-convert_pre_v3_isfiledir( NAObjectProfile *profile )
+convert_pre_v3_isfiledir( FMAObjectProfile *profile )
{
- static const gchar *thisfn = "na_object_profile_convert_pre_v3_isfiledir";
+ static const gchar *thisfn = "fma_object_profile_convert_pre_v3_isfiledir";
gboolean is_all_mimetypes;
gboolean converted;
gboolean isfile, isdir;
@@ -574,23 +574,23 @@ convert_pre_v3_isfiledir( NAObjectProfile *profile )
converted = FALSE;
- na_object_check_mimetypes( profile );
- is_all_mimetypes = na_object_get_all_mimetypes( profile );
+ fma_object_check_mimetypes( profile );
+ is_all_mimetypes = fma_object_get_all_mimetypes( profile );
g_debug( "%s: is_all_mimetypes=%s", thisfn, is_all_mimetypes ? "True":"False" );
if( is_all_mimetypes ){
converted = TRUE;
mimetypes = NULL;
- before_list = na_object_get_mimetypes( profile );
+ before_list = fma_object_get_mimetypes( profile );
- /* this is needed because na_object_is_file() does not return the default
+ /* this is needed because fma_object_is_file() does not return the default
* value when the data is not set (see #651911)
*/
isfile = TRUE;
if( na_factory_object_is_set( FMA_IFACTORY_OBJECT( profile ), FMAFO_DATA_ISFILE )){
- isfile = na_object_is_file( profile );
+ isfile = fma_object_is_file( profile );
}
- isdir = na_object_is_dir( profile );
+ isdir = fma_object_is_dir( profile );
if( isfile ){
if( isdir ){
@@ -617,7 +617,7 @@ convert_pre_v3_isfiledir( NAObjectProfile *profile )
}
if( converted ){
- na_object_set_mimetypes( profile, mimetypes );
+ fma_object_set_mimetypes( profile, mimetypes );
before_str = fma_core_utils_slist_join_at_end( before_list, ";" );
after_str = fma_core_utils_slist_join_at_end( mimetypes, ";" );
@@ -634,7 +634,7 @@ convert_pre_v3_isfiledir( NAObjectProfile *profile )
}
static void
-read_done_ending( NAObjectProfile *profile )
+read_done_ending( FMAObjectProfile *profile )
{
/* split path+parameters
* not done in io-desktop because some actions may have all arguments in path
@@ -657,13 +657,13 @@ read_done_ending( NAObjectProfile *profile )
* => so we definitively keep them as separated boxed in our internal objects
*/
static void
-split_path_parameters( NAObjectProfile *profile )
+split_path_parameters( FMAObjectProfile *profile )
{
gchar *path, *parameters;
gchar *exec;
- path = na_object_get_path( profile );
- parameters = na_object_get_parameters( profile );
+ path = fma_object_get_path( profile );
+ parameters = fma_object_get_parameters( profile );
exec = g_strstrip( g_strdup_printf( "%s %s", path ? path : "", parameters ? parameters : "" ));
g_free( parameters );
g_free( path );
@@ -671,8 +671,8 @@ split_path_parameters( NAObjectProfile *profile )
fma_core_utils_str_split_first_word( exec, &path, ¶meters );
g_free( exec );
- na_object_set_path( profile, path );
- na_object_set_parameters( profile, parameters );
+ fma_object_set_path( profile, path );
+ fma_object_set_parameters( profile, parameters );
g_free( parameters );
g_free( path );
}
@@ -684,14 +684,14 @@ split_path_parameters( NAObjectProfile *profile )
* so, starting with 2.30.1, we only check for non empty path+parameters
*/
static gboolean
-is_valid_path_parameters( const NAObjectProfile *profile )
+is_valid_path_parameters( const FMAObjectProfile *profile )
{
gboolean valid;
gchar *path, *parameters;
gchar *command;
- path = na_object_get_path( profile );
- parameters = na_object_get_parameters( profile );
+ path = fma_object_get_path( profile );
+ parameters = fma_object_get_parameters( profile );
command = g_strdup_printf( "%s %s", path, parameters );
g_strstrip( command );
@@ -703,7 +703,7 @@ is_valid_path_parameters( const NAObjectProfile *profile )
g_free( path );
if( !valid ){
- na_object_debug_invalid( profile, "command" );
+ fma_object_debug_invalid( profile, "command" );
}
return( valid );
@@ -714,17 +714,17 @@ is_valid_path_parameters( const NAObjectProfile *profile )
* the current profile into the target parent
*/
static gchar *
-object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent )
+object_id_new_id( const FMAObjectId *item, const FMAObjectId *new_parent )
{
gchar *id = NULL;
- g_return_val_if_fail( NA_IS_OBJECT_PROFILE( item ), NULL );
- g_return_val_if_fail( !new_parent || NA_IS_OBJECT_ACTION( new_parent ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( item ), NULL );
+ g_return_val_if_fail( !new_parent || FMA_IS_OBJECT_ACTION( new_parent ), NULL );
- if( !NA_OBJECT_PROFILE( item )->private->dispose_has_run ){
+ if( !FMA_OBJECT_PROFILE( item )->private->dispose_has_run ){
if( new_parent ){
- id = na_object_action_get_new_profile_name( NA_OBJECT_ACTION( new_parent ));
+ id = fma_object_action_get_new_profile_name( FMA_OBJECT_ACTION( new_parent ));
}
}
@@ -732,48 +732,48 @@ object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent )
}
/**
- * na_object_profile_new:
+ * fma_object_profile_new:
*
* Allocates a new profile.
*
- * Returns: the newly allocated #NAObjectProfile profile.
+ * Returns: the newly allocated #FMAObjectProfile profile.
*
* Since: 2.30
*/
-NAObjectProfile *
-na_object_profile_new( void )
+FMAObjectProfile *
+fma_object_profile_new( void )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
- profile = g_object_new( NA_TYPE_OBJECT_PROFILE, NULL );
+ profile = g_object_new( FMA_TYPE_OBJECT_PROFILE, NULL );
return( profile );
}
/**
- * na_object_profile_new_with_defaults:
+ * fma_object_profile_new_with_defaults:
*
* Allocates a new profile, and set default values.
*
- * Returns: the newly allocated #NAObjectProfile profile.
+ * Returns: the newly allocated #FMAObjectProfile profile.
*
* Since: 2.30
*/
-NAObjectProfile *
-na_object_profile_new_with_defaults( void )
+FMAObjectProfile *
+fma_object_profile_new_with_defaults( void )
{
- NAObjectProfile *profile = na_object_profile_new();
- na_object_set_id( profile, "profile-zero" );
+ FMAObjectProfile *profile = fma_object_profile_new();
+ fma_object_set_id( profile, "profile-zero" );
/* i18n: label for the default profile */
- na_object_set_label( profile, _( "Default profile" ));
+ fma_object_set_label( profile, _( "Default profile" ));
na_factory_object_set_defaults( FMA_IFACTORY_OBJECT( profile ));
return( profile );
}
/**
- * na_object_profile_convert_v2_to_last:
- * @profile: the #NAObjectProfile profile to be converted.
+ * fma_object_profile_convert_v2_to_last:
+ * @profile: the #FMAObjectProfile profile to be converted.
*
* Converts a v2 profile to the last version, setting the defaults as needed.
*
@@ -784,16 +784,16 @@ na_object_profile_new_with_defaults( void )
* Since: 2.30
*/
void
-na_object_profile_convert_v2_to_last( NAObjectProfile *profile )
+fma_object_profile_convert_v2_to_last( FMAObjectProfile *profile )
{
- NAObjectAction *action;
+ FMAObjectAction *action;
guint iversion;
gboolean parms_converted, multiple_converted, isfiledir_converted;
- g_return_if_fail( NA_IS_OBJECT_PROFILE( profile ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( profile ));
- action = NA_OBJECT_ACTION( na_object_get_parent( profile ));
- iversion = na_object_get_iversion( action );
+ action = FMA_OBJECT_ACTION( fma_object_get_parent( profile ));
+ iversion = fma_object_get_iversion( action );
g_return_if_fail( iversion < 3 );
parms_converted = convert_pre_v3_parameters( profile );
@@ -801,7 +801,7 @@ na_object_profile_convert_v2_to_last( NAObjectProfile *profile )
isfiledir_converted = convert_pre_v3_isfiledir( profile );
if( parms_converted || multiple_converted || isfiledir_converted ){
- na_object_set_iversion( action, 3 );
+ fma_object_set_iversion( action, 3 );
}
read_done_ending( profile );
diff --git a/src/core/na-object.c b/src/core/fma-object.c
similarity index 61%
rename from src/core/na-object.c
rename to src/core/fma-object.c
index 68b49e5..4423a67 100644
--- a/src/core/na-object.c
+++ b/src/core/fma-object.c
@@ -31,46 +31,46 @@
#include <config.h>
#endif
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-factory-object.h"
/* private class data
*/
-struct _NAObjectClassPrivate {
+struct _FMAObjectClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NAObjectPrivate {
+struct _FMAObjectPrivate {
gboolean dispose_has_run;
};
static GObjectClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NAObjectClass *klass );
+static void class_init( FMAObjectClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void object_dump( const NAObject *object );
+static void object_dump( const FMAObject *object );
static void iduplicable_iface_init( FMAIDuplicableInterface *iface, void *user_data );
static void iduplicable_copy( FMAIDuplicable *target, const FMAIDuplicable *source, guint mode );
static gboolean iduplicable_are_equal( const FMAIDuplicable *a, const FMAIDuplicable *b );
static gboolean iduplicable_is_valid( const FMAIDuplicable *object );
-static void check_status_down_rec( const NAObject *object );
-static void check_status_up_rec( const NAObject *object, gboolean was_modified, gboolean was_valid );
-static void v_copy( NAObject *target, const NAObject *source, guint mode );
-static gboolean v_are_equal( const NAObject *a, const NAObject *b );
-static gboolean v_is_valid( const NAObject *a );
+static void check_status_down_rec( const FMAObject *object );
+static void check_status_up_rec( const FMAObject *object, gboolean was_modified, gboolean was_valid );
+static void v_copy( FMAObject *target, const FMAObject *source, guint mode );
+static gboolean v_are_equal( const FMAObject *a, const FMAObject *b );
+static gboolean v_is_valid( const FMAObject *a );
static void dump_tree( GList *tree, gint level );
GType
-na_object_object_get_type( void )
+fma_object_object_get_type( void )
{
static GType item_type = 0;
@@ -84,17 +84,17 @@ na_object_object_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "na_object_register_type";
+ static const gchar *thisfn = "fma_object_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NAObjectClass ),
+ sizeof( FMAObjectClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NAObject ),
+ sizeof( FMAObject ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -107,7 +107,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "NAObject", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMAObject", &info, 0 );
g_type_add_interface_static( type, FMA_TYPE_IDUPLICABLE, &iduplicable_iface_info );
@@ -115,11 +115,11 @@ register_type( void )
}
static void
-class_init( NAObjectClass *klass )
+class_init( FMAObjectClass *klass )
{
- static const gchar *thisfn = "na_object_class_init";
+ static const gchar *thisfn = "fma_object_class_init";
GObjectClass *object_class;
- NAObjectClass *naobject_class;
+ FMAObjectClass *naobject_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -129,35 +129,35 @@ class_init( NAObjectClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- naobject_class = NA_OBJECT_CLASS( klass );
+ naobject_class = FMA_OBJECT_CLASS( klass );
naobject_class->dump = object_dump;
naobject_class->copy = NULL;
naobject_class->are_equal = NULL;
naobject_class->is_valid = NULL;
- klass->private = g_new0( NAObjectClassPrivate, 1 );
+ klass->private = g_new0( FMAObjectClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- NAObject *self;
+ FMAObject *self;
- g_return_if_fail( NA_IS_OBJECT( instance ));
+ g_return_if_fail( FMA_IS_OBJECT( instance ));
- self = NA_OBJECT( instance );
+ self = FMA_OBJECT( instance );
- self->private = g_new0( NAObjectPrivate, 1 );
+ self->private = g_new0( FMAObjectPrivate, 1 );
}
static void
instance_dispose( GObject *object )
{
- NAObject *self;
+ FMAObject *self;
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
- self = NA_OBJECT( object );
+ self = FMA_OBJECT( object );
if( !self->private->dispose_has_run ){
@@ -175,11 +175,11 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- NAObject *self;
+ FMAObject *self;
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
- self = NA_OBJECT( object );
+ self = FMA_OBJECT( object );
g_free( self->private );
@@ -194,7 +194,7 @@ instance_finalize( GObject *object )
}
static void
-object_dump( const NAObject *object )
+object_dump( const FMAObject *object )
{
if( !object->private->dispose_has_run ){
@@ -209,7 +209,7 @@ object_dump( const NAObject *object )
static void
iduplicable_iface_init( FMAIDuplicableInterface *iface, void *user_data )
{
- static const gchar *thisfn = "na_object_iduplicable_iface_init";
+ static const gchar *thisfn = "fma_object_iduplicable_iface_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
@@ -225,14 +225,14 @@ iduplicable_iface_init( FMAIDuplicableInterface *iface, void *user_data )
static void
iduplicable_copy( FMAIDuplicable *target, const FMAIDuplicable *source, guint mode )
{
- static const gchar *thisfn = "na_object_iduplicable_copy";
- NAObject *dest, *src;
+ static const gchar *thisfn = "fma_object_iduplicable_copy";
+ FMAObject *dest, *src;
- g_return_if_fail( NA_IS_OBJECT( target ));
- g_return_if_fail( NA_IS_OBJECT( source ));
+ g_return_if_fail( FMA_IS_OBJECT( target ));
+ g_return_if_fail( FMA_IS_OBJECT( source ));
- dest = NA_OBJECT( target );
- src = NA_OBJECT( source );
+ dest = FMA_OBJECT( target );
+ src = FMA_OBJECT( source );
if( !dest->private->dispose_has_run &&
!src->private->dispose_has_run ){
@@ -258,16 +258,16 @@ iduplicable_copy( FMAIDuplicable *target, const FMAIDuplicable *source, guint mo
static gboolean
iduplicable_are_equal( const FMAIDuplicable *a, const FMAIDuplicable *b )
{
- static const gchar *thisfn = "na_object_iduplicable_are_equal";
+ static const gchar *thisfn = "fma_object_iduplicable_are_equal";
gboolean are_equal;
- g_return_val_if_fail( NA_IS_OBJECT( a ), FALSE );
- g_return_val_if_fail( NA_IS_OBJECT( b ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT( a ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT( b ), FALSE );
are_equal = FALSE;
- if( !NA_OBJECT( a )->private->dispose_has_run &&
- !NA_OBJECT( b )->private->dispose_has_run ){
+ if( !FMA_OBJECT( a )->private->dispose_has_run &&
+ !FMA_OBJECT( b )->private->dispose_has_run ){
g_debug( "%s: a=%p (%s), b=%p", thisfn, ( void * ) a, G_OBJECT_TYPE_NAME( a ), ( void * ) b );
@@ -281,7 +281,7 @@ iduplicable_are_equal( const FMAIDuplicable *a, const FMAIDuplicable *b )
are_equal &= fma_icontext_are_equal( FMA_ICONTEXT( a ), FMA_ICONTEXT( b ));
}
- are_equal &= v_are_equal( NA_OBJECT( a ), NA_OBJECT( b ));
+ are_equal &= v_are_equal( FMA_OBJECT( a ), FMA_OBJECT( b ));
}
return( are_equal );
@@ -290,14 +290,14 @@ iduplicable_are_equal( const FMAIDuplicable *a, const FMAIDuplicable *b )
static gboolean
iduplicable_is_valid( const FMAIDuplicable *object )
{
- static const gchar *thisfn = "na_object_iduplicable_is_valid";
+ static const gchar *thisfn = "fma_object_iduplicable_is_valid";
gboolean is_valid;
- g_return_val_if_fail( NA_IS_OBJECT( object ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT( object ), FALSE );
is_valid = FALSE;
- if( !NA_OBJECT( object )->private->dispose_has_run ){
+ if( !FMA_OBJECT( object )->private->dispose_has_run ){
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
is_valid = TRUE;
@@ -310,15 +310,15 @@ iduplicable_is_valid( const FMAIDuplicable *object )
is_valid &= fma_icontext_is_valid( FMA_ICONTEXT( object ));
}
- is_valid &= v_is_valid( NA_OBJECT( object ));
+ is_valid &= v_is_valid( FMA_OBJECT( object ));
}
return( is_valid );
}
/**
- * na_object_object_check_status_rec:
- * @object: the #NAObject -derived object to be checked.
+ * fma_object_object_check_status_rec:
+ * @object: the #FMAObject -derived object to be checked.
*
* Recursively checks for the edition status of @object and its children
* (if any).
@@ -327,23 +327,23 @@ iduplicable_is_valid( const FMAIDuplicable *object )
* two-steps check-request let us optimize some work in the UI.
*
* <literallayout>
- * na_object_object_check_status_rec( object )
+ * fma_object_object_check_status_rec( object )
* +- fma_iduplicable_check_status( object )
* +- get_origin( object )
* +- modified_status = v_are_equal( origin, object )
- * | +-> interface <structfield>NAObjectClass::are_equal</structfield>
+ * | +-> interface <structfield>FMAObjectClass::are_equal</structfield>
* | which happens to be iduplicable_are_equal( a, b )
* | +- v_are_equal( a, b )
- * | +- NAObjectAction::are_equal()
+ * | +- FMAObjectAction::are_equal()
* | +- na_factory_object_are_equal()
- * | +- check NAObjectActionPrivate data
+ * | +- check FMAObjectActionPrivate data
* | +- call parent class
- * | +- NAObjectItem::are_equal()
- * | +- check NAObjectItemPrivate data
+ * | +- FMAObjectItem::are_equal()
+ * | +- check FMAObjectItemPrivate data
* | +- call parent class
- * | +- NAObjectId::are_equal()
+ * | +- FMAObjectId::are_equal()
* |
- * +- valid_status = v_is_valid( object ) -> interface
<structfield>NAObjectClass::is_valid</structfield>
+ * +- valid_status = v_is_valid( object ) -> interface
<structfield>FMAObjectClass::is_valid</structfield>
* </literallayout>
*
* Note that the recursivity is managed here, so that we can be sure
@@ -358,8 +358,8 @@ iduplicable_is_valid( const FMAIDuplicable *object )
* <itemizedlist>
* <listitem>
* <para>
- * when the modification status of a NAObjectProfile changes, then its
- * NAObjectAction parent is rechecked;
+ * when the modification status of a FMAObjectProfile changes, then its
+ * FMAObjectAction parent is rechecked;
* </para>
* </listitem>
* <listitem>
@@ -375,18 +375,18 @@ iduplicable_is_valid( const FMAIDuplicable *object )
* Since: 2.30
*/
void
-na_object_object_check_status_rec( const NAObject *object )
+fma_object_object_check_status_rec( const FMAObject *object )
{
- static const gchar *thisfn = "na_object_object_check_status_rec";
+ static const gchar *thisfn = "fma_object_object_check_status_rec";
gboolean was_modified, was_valid;
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
if( !object->private->dispose_has_run ){
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- was_modified = na_object_is_modified( object );
- was_valid = na_object_is_valid( object );
+ was_modified = fma_object_is_modified( object );
+ was_valid = fma_object_is_valid( object );
check_status_down_rec( object );
check_status_up_rec( object, was_modified, was_valid );
}
@@ -396,10 +396,10 @@ na_object_object_check_status_rec( const NAObject *object )
* recursively checks the status downstream
*/
static void
-check_status_down_rec( const NAObject *object )
+check_status_down_rec( const FMAObject *object )
{
- if( NA_IS_OBJECT_ITEM( object )){
- g_list_foreach( na_object_get_items( object ), ( GFunc ) check_status_down_rec, NULL );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ g_list_foreach( fma_object_get_items( object ), ( GFunc ) check_status_down_rec, NULL );
}
fma_iduplicable_check_status( FMA_IDUPLICABLE( object ));
@@ -410,95 +410,95 @@ check_status_down_rec( const NAObject *object )
* recurse upstream while there is a parent, and its status changes
*/
static void
-check_status_up_rec( const NAObject *object, gboolean was_modified, gboolean was_valid )
+check_status_up_rec( const FMAObject *object, gboolean was_modified, gboolean was_valid )
{
gboolean is_modified, is_valid;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
- is_modified = na_object_is_modified( object );
- is_valid = na_object_is_valid( object );
+ is_modified = fma_object_is_modified( object );
+ is_valid = fma_object_is_valid( object );
- if(( NA_IS_OBJECT_PROFILE( object ) && was_modified != is_modified ) ||
+ if(( FMA_IS_OBJECT_PROFILE( object ) && was_modified != is_modified ) ||
was_valid != is_valid ){
- parent = na_object_get_parent( object );
+ parent = fma_object_get_parent( object );
if( parent ){
- was_modified = na_object_is_modified( parent );
- was_valid = na_object_is_valid( parent );
+ was_modified = fma_object_is_modified( parent );
+ was_valid = fma_object_is_valid( parent );
fma_iduplicable_check_status( FMA_IDUPLICABLE( parent ));
- check_status_up_rec( NA_OBJECT( parent ), was_modified, was_valid );
+ check_status_up_rec( FMA_OBJECT( parent ), was_modified, was_valid );
}
}
}
static void
-v_copy( NAObject *target, const NAObject *source, guint mode )
+v_copy( FMAObject *target, const FMAObject *source, guint mode )
{
- if( NA_OBJECT_GET_CLASS( target )->copy ){
- NA_OBJECT_GET_CLASS( target )->copy( target, source, mode );
+ if( FMA_OBJECT_GET_CLASS( target )->copy ){
+ FMA_OBJECT_GET_CLASS( target )->copy( target, source, mode );
}
}
static gboolean
-v_are_equal( const NAObject *a, const NAObject *b )
+v_are_equal( const FMAObject *a, const FMAObject *b )
{
- if( NA_OBJECT_GET_CLASS( a )->are_equal ){
- return( NA_OBJECT_GET_CLASS( a )->are_equal( a, b ));
+ if( FMA_OBJECT_GET_CLASS( a )->are_equal ){
+ return( FMA_OBJECT_GET_CLASS( a )->are_equal( a, b ));
}
return( TRUE );
}
static gboolean
-v_is_valid( const NAObject *a )
+v_is_valid( const FMAObject *a )
{
- if( NA_OBJECT_GET_CLASS( a )->is_valid ){
- return( NA_OBJECT_GET_CLASS( a )->is_valid( a ));
+ if( FMA_OBJECT_GET_CLASS( a )->is_valid ){
+ return( FMA_OBJECT_GET_CLASS( a )->is_valid( a ));
}
return( TRUE );
}
/**
- * na_object_object_dump:
- * @object: the #NAObject -derived object to be dumped.
+ * fma_object_object_dump:
+ * @object: the #FMAObject -derived object to be dumped.
*
* Dumps via g_debug() the actual content of the object.
*
* The recursivity is dealt with here because, if we would let
- * #NAObjectItem do this, the dump of #NAObjectItem -derived object
+ * #FMAObjectItem do this, the dump of #FMAObjectItem -derived object
* would be splitted, children being inserted inside.
*
- * na_object_dump() doesn't modify the reference count of the dumped
+ * fma_object_dump() doesn't modify the reference count of the dumped
* object.
*
* Since: 2.30
*/
void
-na_object_object_dump( const NAObject *object )
+fma_object_object_dump( const FMAObject *object )
{
GList *children, *ic;
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
if( !object->private->dispose_has_run ){
- na_object_dump_norec( object );
+ fma_object_dump_norec( object );
- if( NA_IS_OBJECT_ITEM( object )){
- children = na_object_get_items( object );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ children = fma_object_get_items( object );
for( ic = children ; ic ; ic = ic->next ){
- na_object_dump( ic->data );
+ fma_object_dump( ic->data );
}
}
}
}
/**
- * na_object_object_dump_norec:
- * @object: the #NAObject -derived object to be dumped.
+ * fma_object_object_dump_norec:
+ * @object: the #FMAObject -derived object to be dumped.
*
* Dumps via g_debug the actual content of the object.
*
@@ -507,27 +507,27 @@ na_object_object_dump( const NAObject *object )
* Since: 2.30
*/
void
-na_object_object_dump_norec( const NAObject *object )
+fma_object_object_dump_norec( const FMAObject *object )
{
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
if( !object->private->dispose_has_run ){
- if( NA_OBJECT_GET_CLASS( object )->dump ){
- NA_OBJECT_GET_CLASS( object )->dump( object );
+ if( FMA_OBJECT_GET_CLASS( object )->dump ){
+ FMA_OBJECT_GET_CLASS( object )->dump( object );
}
}
}
/**
- * na_object_object_dump_tree:
- * @tree: a hierarchical list of #NAObject -derived objects.
+ * fma_object_object_dump_tree:
+ * @tree: a hierarchical list of #FMAObject -derived objects.
*
* Outputs a brief, hierarchical dump of the provided list.
*
* Since: 2.30
*/
void
-na_object_object_dump_tree( GList *tree )
+fma_object_object_dump_tree( GList *tree )
{
dump_tree( tree, 0 );
}
@@ -538,7 +538,7 @@ dump_tree( GList *tree, gint level )
GString *prefix;
gint i;
GList *it;
- const NAObject *object;
+ const FMAObject *object;
gchar *label;
prefix = g_string_new( "" );
@@ -547,14 +547,14 @@ dump_tree( GList *tree, gint level )
}
for( it = tree ; it ; it = it->next ){
- object = ( const NAObject * ) it->data;
- label = na_object_get_label( object );
- g_debug( "na_object_dump_tree: %s%p (%s, ref_count=%u) '%s'", prefix->str,
+ object = ( const FMAObject * ) it->data;
+ label = fma_object_get_label( object );
+ g_debug( "fma_object_dump_tree: %s%p (%s, ref_count=%u) '%s'", prefix->str,
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object
)->ref_count, label );
g_free( label );
- if( NA_IS_OBJECT_ITEM( object )){
- dump_tree( na_object_get_items( object ), level+1 );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ dump_tree( fma_object_get_items( object ), level+1 );
}
}
@@ -562,8 +562,8 @@ dump_tree( GList *tree, gint level )
}
/**
- * na_object_object_reset_origin:
- * @object: a #NAObject -derived object.
+ * fma_object_object_reset_origin:
+ * @object: a #FMAObject -derived object.
* @origin: must be a duplication of @object.
*
* Recursively reset origin of @object and its children to @origin (and
@@ -577,21 +577,21 @@ dump_tree( GList *tree, gint level )
* Since: 2.30
*/
void
-na_object_object_reset_origin( NAObject *object, const NAObject *origin )
+fma_object_object_reset_origin( FMAObject *object, const FMAObject *origin )
{
GList *origin_children, *iorig;
GList *object_children, *iobj;
- g_return_if_fail( NA_IS_OBJECT( origin ));
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( origin ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
if( !object->private->dispose_has_run && !origin->private->dispose_has_run ){
- origin_children = na_object_get_items( origin );
- object_children = na_object_get_items( object );
+ origin_children = fma_object_get_items( origin );
+ object_children = fma_object_get_items( object );
for( iorig = origin_children, iobj = object_children ; iorig && iobj ; iorig = iorig->next,
iobj = iobj->next ){
- na_object_reset_origin( iobj->data, iorig->data );
+ fma_object_reset_origin( iobj->data, iorig->data );
}
fma_iduplicable_set_origin( FMA_IDUPLICABLE( object ), FMA_IDUPLICABLE( origin ));
@@ -600,8 +600,8 @@ na_object_object_reset_origin( NAObject *object, const NAObject *origin )
}
/**
- * na_object_object_ref:
- * @object: a #NAObject -derived object.
+ * fma_object_object_ref:
+ * @object: a #FMAObject -derived object.
*
* Recursively ref the @object and all its children, incrementing their
* reference_count by 1.
@@ -610,19 +610,19 @@ na_object_object_reset_origin( NAObject *object, const NAObject *origin )
*
* Since: 2.30
*/
-NAObject *
-na_object_object_ref( NAObject *object )
+FMAObject *
+fma_object_object_ref( FMAObject *object )
{
- NAObject *ref;
+ FMAObject *ref;
- g_return_val_if_fail( NA_IS_OBJECT( object ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
ref = NULL;
if( !object->private->dispose_has_run ){
- if( NA_IS_OBJECT_ITEM( object )){
- g_list_foreach( na_object_get_items( object ), ( GFunc ) na_object_object_ref, NULL );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ g_list_foreach( fma_object_get_items( object ), ( GFunc ) fma_object_object_ref, NULL
);
}
ref = g_object_ref( object );
@@ -632,8 +632,8 @@ na_object_object_ref( NAObject *object )
}
/**
- * na_object_object_unref:
- * @object: a #NAObject -derived object.
+ * fma_object_object_unref:
+ * @object: a #FMAObject -derived object.
*
* Recursively unref the @object and all its children, decrementing their
* reference_count by 1.
@@ -645,13 +645,13 @@ na_object_object_ref( NAObject *object )
* Since: 2.30
*/
void
-na_object_object_unref( NAObject *object )
+fma_object_object_unref( FMAObject *object )
{
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
if( !object->private->dispose_has_run ){
- if( NA_IS_OBJECT_ITEM( object )){
- g_list_foreach( na_object_get_items( object ), ( GFunc ) na_object_object_unref, NULL
);
+ if( FMA_IS_OBJECT_ITEM( object )){
+ g_list_foreach( fma_object_get_items( object ), ( GFunc ) fma_object_object_unref,
NULL );
}
g_object_unref( object );
}
@@ -660,11 +660,11 @@ na_object_object_unref( NAObject *object )
#ifdef NA_ENABLE_DEPRECATED
/*
* build the class hierarchy
- * returns a list of GObjectClass, which starts with NAObject,
- * and to with the most derived class (e.g. NAObjectAction or so)
+ * returns a list of GObjectClass, which starts with FMAObject,
+ * and to with the most derived class (e.g. FMAObjectAction or so)
*/
static GList *
-build_class_hierarchy( const NAObject *object )
+build_class_hierarchy( const FMAObject *object )
{
GObjectClass *class;
GList *hierarchy;
@@ -672,7 +672,7 @@ build_class_hierarchy( const NAObject *object )
hierarchy = NULL;
class = G_OBJECT_GET_CLASS( object );
- while( G_OBJECT_CLASS_TYPE( class ) != NA_TYPE_OBJECT ){
+ while( G_OBJECT_CLASS_TYPE( class ) != FMA_TYPE_OBJECT ){
hierarchy = g_list_prepend( hierarchy, class );
class = g_type_class_peek_parent( class );
@@ -684,8 +684,8 @@ build_class_hierarchy( const NAObject *object )
}
/**
- * na_object_get_hierarchy:
- * @object: the #NAObject -derived object.
+ * fma_object_get_hierarchy:
+ * @object: the #FMAObject -derived object.
*
* Returns: the class hierarchy,
* from the topmost base class, to the most-derived one.
@@ -694,11 +694,11 @@ build_class_hierarchy( const NAObject *object )
* Deprecated: 3.1
*/
GList *
-na_object_get_hierarchy( const NAObject *object )
+fma_object_get_hierarchy( const FMAObject *object )
{
GList *hierarchy;
- g_return_val_if_fail( NA_IS_OBJECT( object ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
hierarchy = NULL;
@@ -711,25 +711,25 @@ na_object_get_hierarchy( const NAObject *object )
}
/**
- * na_object_free_hierarchy:
+ * fma_object_free_hierarchy:
* @hierarchy: the #GList of hierarchy, as returned from
- * na_object_get_hierarchy().
+ * fma_object_get_hierarchy().
*
- * Releases the #NAObject hierarchy.
+ * Releases the #FMAObject hierarchy.
*
* Since: 2.30
* Deprecated: 3.1
*/
void
-na_object_free_hierarchy( GList *hierarchy )
+fma_object_free_hierarchy( GList *hierarchy )
{
g_list_free( hierarchy );
}
#endif /* NA_ENABLE_DEPRECATED */
/**
- * na_object_object_debug_invalid:
- * @object: the #NAObject -derived object which is invalid.
+ * fma_object_object_debug_invalid:
+ * @object: the #FMAObject -derived object which is invalid.
* @reason: the reason.
*
* Dump the object with the invalidity reason.
@@ -737,8 +737,8 @@ na_object_free_hierarchy( GList *hierarchy )
* Since: 2.30
*/
void
-na_object_object_debug_invalid( const NAObject *object, const gchar *reason )
+fma_object_object_debug_invalid( const FMAObject *object, const gchar *reason )
{
- g_debug( "na_object_object_debug_invalid: object %p (%s) is marked invalid for reason \"%s\"",
+ g_debug( "fma_object_object_debug_invalid: object %p (%s) is marked invalid for reason \"%s\"",
( void * ) object, G_OBJECT_TYPE_NAME( object ), reason );
}
diff --git a/src/core/na-exporter.c b/src/core/na-exporter.c
index 9049182..331cb9a 100644
--- a/src/core/na-exporter.c
+++ b/src/core/na-exporter.c
@@ -248,7 +248,7 @@ on_pixbuf_finalized( gpointer user_data /* ==NULL */, GObject *pixbuf )
/*
* na_exporter_to_buffer:
* @pivot: the #NAPivot pivot for the running application.
- * @item: a #NAObjectItem-derived object.
+ * @item: a #FMAObjectItem-derived object.
* @format: the target format identifier.
* @messages: a pointer to a #GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
@@ -260,7 +260,7 @@ on_pixbuf_finalized( gpointer user_data /* ==NULL */, GObject *pixbuf )
*/
gchar *
na_exporter_to_buffer( const NAPivot *pivot,
- const NAObjectItem *item, const gchar *format, GSList **messages )
+ const FMAObjectItem *item, const gchar *format, GSList **messages )
{
static const gchar *thisfn = "na_exporter_to_buffer";
gchar *buffer;
@@ -270,7 +270,7 @@ na_exporter_to_buffer( const NAPivot *pivot,
gchar *msg;
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), NULL );
buffer = NULL;
@@ -286,7 +286,7 @@ na_exporter_to_buffer( const NAPivot *pivot,
if( exporter ){
parms.version = 2;
- parms.exported = ( NAObjectItem * ) item;
+ parms.exported = ( FMAObjectItem * ) item;
parms.format = g_strdup( format );
parms.buffer = NULL;
parms.messages = messages ? *messages : NULL;
@@ -319,7 +319,7 @@ na_exporter_to_buffer( const NAPivot *pivot,
/*
* na_exporter_to_file:
* @pivot: the #NAPivot pivot for the running application.
- * @item: a #NAObjectItem-derived object.
+ * @item: a #FMAObjectItem-derived object.
* @folder_uri: the URI of the target folder.
* @format: the target format identifier.
* @messages: a pointer to a #GSList list of strings; the provider
@@ -332,7 +332,7 @@ na_exporter_to_buffer( const NAPivot *pivot,
*/
gchar *
na_exporter_to_file( const NAPivot *pivot,
- const NAObjectItem *item, const gchar *folder_uri, const gchar *format, GSList **messages )
+ const FMAObjectItem *item, const gchar *folder_uri, const gchar *format, GSList **messages )
{
static const gchar *thisfn = "na_exporter_to_file";
gchar *export_uri;
@@ -342,7 +342,7 @@ na_exporter_to_file( const NAPivot *pivot,
gchar *name;
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), NULL );
export_uri = NULL;
@@ -358,7 +358,7 @@ na_exporter_to_file( const NAPivot *pivot,
if( exporter ){
parms.version = 2;
- parms.exported = ( NAObjectItem * ) item;
+ parms.exported = ( FMAObjectItem * ) item;
parms.folder = ( gchar * ) folder_uri;
parms.format = g_strdup( format );
parms.basename = NULL;
diff --git a/src/core/na-exporter.h b/src/core/na-exporter.h
index 77b7a8a..6f87e99 100644
--- a/src/core/na-exporter.h
+++ b/src/core/na-exporter.h
@@ -36,7 +36,7 @@
*/
#include <api/fma-iexporter.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-ioption.h"
#include "na-pivot.h"
@@ -51,12 +51,12 @@ void na_exporter_free_formats ( GList *formats );
NAIOption *na_exporter_get_ask_option ( void );
gchar *na_exporter_to_buffer ( const NAPivot *pivot,
- const NAObjectItem *item,
+ const FMAObjectItem *item,
const gchar *format,
GSList **messages );
gchar *na_exporter_to_file ( const NAPivot *pivot,
- const NAObjectItem *item,
+ const FMAObjectItem *item,
const gchar *folder_uri,
const gchar *format,
GSList **messages );
diff --git a/src/core/na-factory-object.c b/src/core/na-factory-object.c
index bb98e02..217c910 100644
--- a/src/core/na-factory-object.c
+++ b/src/core/na-factory-object.c
@@ -40,7 +40,7 @@
#include <api/fma-data-types.h>
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-factory-object.h"
#include "na-factory-provider.h"
@@ -374,8 +374,8 @@ na_factory_object_copy( FMAIFactoryObject *target, const FMAIFactoryObject *sour
/* first remove copyable data from target
*/
- provider = na_object_get_provider( target );
- provider_data = na_object_get_provider_data( target );
+ provider = fma_object_get_provider( target );
+ provider_data = fma_object_get_provider_data( target );
idest = dest_list = g_object_get_data( G_OBJECT( target ), FMA_IFACTORY_OBJECT_PROP_DATA );
while( idest ){
@@ -407,9 +407,9 @@ na_factory_object_copy( FMAIFactoryObject *target, const FMAIFactoryObject *sour
}
if( provider ){
- na_object_set_provider( target, provider );
+ fma_object_set_provider( target, provider );
if( provider_data ){
- na_object_set_provider_data( target, provider_data );
+ fma_object_set_provider_data( target, provider_data );
}
}
diff --git a/src/core/na-importer-ask.c b/src/core/na-importer-ask.c
index 2cd68f3..b87576c 100644
--- a/src/core/na-importer-ask.c
+++ b/src/core/na-importer-ask.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <api/fma-iimporter.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-gtk-utils.h"
#include "na-import-mode.h"
@@ -54,8 +54,8 @@ struct _NAImporterAskClassPrivate {
struct _NAImporterAskPrivate {
gboolean dispose_has_run;
GtkWindow *toplevel;
- NAObjectItem *importing;
- NAObjectItem *existing;
+ FMAObjectItem *importing;
+ FMAObjectItem *existing;
NAImporterAskUserParms *parms;
guint mode;
};
@@ -300,8 +300,8 @@ import_ask_new( GtkWindow *parent )
/*
* na_importer_ask_user:
- * @importing: the #NAObjectItem-derived object being currently imported.
- * @existing: the #NAObjectItem-derived already existing object with the same ID.
+ * @importing: the #FMAObjectItem-derived object being currently imported.
+ * @existing: the #FMAObjectItem-derived already existing object with the same ID.
* @parms: a #FMAIImporterUriParms structure.
*
* Ask the user for what to do when an imported item has the same ID
@@ -323,15 +323,15 @@ import_ask_new( GtkWindow *parent )
* becomes his preference import mode.
*/
guint
-na_importer_ask_user( const NAObjectItem *importing, const NAObjectItem *existing, NAImporterAskUserParms
*parms )
+na_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *existing, NAImporterAskUserParms
*parms )
{
static const gchar *thisfn = "na_importer_ask_user";
NAImporterAsk *dialog;
guint mode;
gint code;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( importing ), IMPORTER_MODE_NO_IMPORT );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( existing ), IMPORTER_MODE_NO_IMPORT );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( importing ), IMPORTER_MODE_NO_IMPORT );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( existing ), IMPORTER_MODE_NO_IMPORT );
g_debug( "%s: importing=%p, existing=%p, parms=%p",
thisfn, ( void * ) importing, ( void * ) existing, ( void * ) parms );
@@ -341,8 +341,8 @@ na_importer_ask_user( const NAObjectItem *importing, const NAObjectItem *existin
if( dialog ){
- dialog->private->importing = ( NAObjectItem * ) importing;
- dialog->private->existing = ( NAObjectItem * ) existing;
+ dialog->private->importing = ( FMAObjectItem * ) importing;
+ dialog->private->existing = ( FMAObjectItem * ) existing;
dialog->private->parms = parms;
initialize_window( dialog, dialog->private->toplevel );
@@ -392,10 +392,10 @@ initialize_window( NAImporterAsk *editor, GtkWindow *toplevel )
g_debug( "%s: editor=%p, toplevel=%p", thisfn, ( void * ) editor, ( void * ) toplevel );
- imported_label = na_object_get_label( editor->private->importing );
- existing_label = na_object_get_label( editor->private->existing );
+ imported_label = fma_object_get_label( editor->private->importing );
+ existing_label = fma_object_get_label( editor->private->existing );
- if( NA_IS_OBJECT_ACTION( editor->private->importing )){
+ if( FMA_IS_OBJECT_ACTION( editor->private->importing )){
/* i18n: The action <action_label> imported from <file> has the same id than <existing_label>
*/
label = g_strdup_printf(
_( "The action \"%s\" imported from \"%s\" has the same identifier than the
already existing \"%s\"." ),
diff --git a/src/core/na-importer-ask.h b/src/core/na-importer-ask.h
index d1f18b7..d4ce002 100644
--- a/src/core/na-importer-ask.h
+++ b/src/core/na-importer-ask.h
@@ -41,7 +41,7 @@
#include <gtk/gtk.h>
-#include <api/na-object-item.h>
+#include <api/fma-object-item.h>
#include "na-pivot.h"
@@ -83,7 +83,7 @@ typedef struct {
GType na_importer_ask_get_type( void );
-guint na_importer_ask_user( const NAObjectItem *importing, const NAObjectItem *existing,
NAImporterAskUserParms *parms );
+guint na_importer_ask_user( const FMAObjectItem *importing, const FMAObjectItem *existing,
NAImporterAskUserParms *parms );
G_END_DECLS
diff --git a/src/core/na-importer.c b/src/core/na-importer.c
index 9db7ea7..17f5d22 100644
--- a/src/core/na-importer.c
+++ b/src/core/na-importer.c
@@ -36,7 +36,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-iimporter.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-import-mode.h"
#include "na-importer.h"
@@ -91,9 +91,9 @@ static NAImportModeStr st_import_ask_mode = {
static NAImporterResult *import_from_uri( const NAPivot *pivot, GList *modules, const gchar *uri );
static void manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserParms
*ask_parms, NAImporterResult *result );
-static NAObjectItem *is_importing_already_exists( NAImporterParms *parms, GList *results,
NAImporterResult *result );
-static void renumber_label_item( NAObjectItem *item );
-static guint ask_user_for_mode( const NAObjectItem *importing, const NAObjectItem *existing,
NAImporterAskUserParms *parms );
+static FMAObjectItem *is_importing_already_exists( NAImporterParms *parms, GList *results,
NAImporterResult *result );
+static void renumber_label_item( FMAObjectItem *item );
+static guint ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing,
NAImporterAskUserParms *parms );
static guint get_id_from_string( const gchar *str );
static NAIOption *get_mode_from_struct( const NAImportModeStr *str );
@@ -117,7 +117,7 @@ static NAIOption *get_mode_from_struct( const NAImportModeStr *str );
* #NAImporterResult structure which will contain:
* - the imported URI
* - the #FMAIImporter provider if one has been found, or %NULL
- * - a #NAObjectItem item if import was successful, or %NULL
+ * - a #FMAObjectItem item if import was successful, or %NULL
* - a list of error messages, or %NULL.
*
* Returns: a #GList of #NAImporterResult structures
@@ -176,7 +176,7 @@ na_importer_import_from_uris( const NAPivot *pivot, NAImporterParms *parms )
import_result = ( NAImporterResult * ) ires->data;
if( import_result->imported ){
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( import_result->imported ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( import_result->imported ), NULL );
g_return_val_if_fail( FMA_IS_IIMPORTER( import_result->importer ), NULL );
ask_parms.uri = import_result->uri;
@@ -273,7 +273,7 @@ static void
manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserParms *ask_parms,
NAImporterResult *result )
{
static const gchar *thisfn = "na_importer_manage_import_mode";
- NAObjectItem *exists;
+ FMAObjectItem *exists;
guint mode;
gchar *id;
@@ -338,7 +338,7 @@ manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserPar
case IMPORTER_MODE_NO_IMPORT:
default:
- id = na_object_get_id( result->imported );
+ id = fma_object_get_id( result->imported );
fma_core_utils_slist_add_message(
&result->messages,
_( "Item %s already exists." ),
@@ -360,16 +360,16 @@ manage_import_mode( NAImporterParms *parms, GList *results, NAImporterAskUserPar
* First check here for duplicates inside of imported population,
* then delegates to the caller-provided check function the rest of work...
*/
-static NAObjectItem *
+static FMAObjectItem *
is_importing_already_exists( NAImporterParms *parms, GList *results, NAImporterResult *result )
{
static const gchar *thisfn = "na_importer_is_importing_already_exists";
- NAObjectItem *exists;
+ FMAObjectItem *exists;
GList *ip;
exists = NULL;
- gchar *importing_id = na_object_get_id( result->imported );
+ gchar *importing_id = fma_object_get_id( result->imported );
g_debug( "%s: importing=%p, id=%s", thisfn, ( void * ) result->imported, importing_id );
/* is the importing item already in the current importation list ?
@@ -379,11 +379,11 @@ is_importing_already_exists( NAImporterParms *parms, GList *results, NAImporterR
NAImporterResult *try_result = ( NAImporterResult * ) ip->data;
if( try_result->imported ){
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( try_result->imported ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( try_result->imported ), NULL );
- gchar *id = na_object_get_id( try_result->imported );
+ gchar *id = fma_object_get_id( try_result->imported );
if( !strcmp( importing_id, id )){
- exists = NA_OBJECT_ITEM( try_result->imported );
+ exists = FMA_OBJECT_ITEM( try_result->imported );
}
g_free( id );
}
@@ -405,25 +405,25 @@ is_importing_already_exists( NAImporterParms *parms, GList *results, NAImporterR
* renumber the item, and set a new label
*/
static void
-renumber_label_item( NAObjectItem *item )
+renumber_label_item( FMAObjectItem *item )
{
gchar *label, *tmp;
- na_object_set_new_id( item, NULL );
+ fma_object_set_new_id( item, NULL );
- label = na_object_get_label( item );
+ label = fma_object_get_label( item );
/* i18n: the action has been renumbered during import operation */
tmp = g_strdup_printf( "%s %s", label, _( "(renumbered)" ));
- na_object_set_label( item, tmp );
+ fma_object_set_label( item, tmp );
g_free( tmp );
g_free( label );
}
static guint
-ask_user_for_mode( const NAObjectItem *importing, const NAObjectItem *existing, NAImporterAskUserParms
*parms )
+ask_user_for_mode( const FMAObjectItem *importing, const FMAObjectItem *existing, NAImporterAskUserParms
*parms )
{
guint mode;
gchar *mode_str;
diff --git a/src/core/na-importer.h b/src/core/na-importer.h
index 33cd658..c1aff76 100644
--- a/src/core/na-importer.h
+++ b/src/core/na-importer.h
@@ -58,7 +58,7 @@
#include <gtk/gtk.h>
#include <api/fma-iimporter.h>
-#include <api/na-object-item.h>
+#include <api/fma-object-item.h>
#include "na-ioption.h"
#include "na-pivot.h"
@@ -93,7 +93,7 @@ typedef enum {
/*
* NAImporterCheckFn:
- * @imported: the currently imported #NAObjectItem -derived object.
+ * @imported: the currently imported #FMAObjectItem -derived object.
* @fn_data: some data to be passed to the function.
*
* The library takes care of checking for duplicates inside of the imported
@@ -110,11 +110,11 @@ typedef enum {
* If the caller does not provide its own check function, then each imported
* item will be systematically renumbered (allocated a new identifier).
*
- * Returns: the already existing #NAObjectItem with same id, or %NULL.
+ * Returns: the already existing #FMAObjectItem with same id, or %NULL.
*
* Since: 3.2
*/
-typedef NAObjectItem * ( *NAImporterCheckFn )( const NAObjectItem *, void * );
+typedef FMAObjectItem * ( *NAImporterCheckFn )( const FMAObjectItem *, void * );
typedef struct {
GSList *uris; /* the list of uris to import */
@@ -130,7 +130,7 @@ typedef struct {
/* phase 1: import into memory from i/o provider
*/
gchar *uri; /* the imported uri */
- NAObjectItem *imported; /* the imported NAObjectItem-derived object, or %NULL
*/
+ FMAObjectItem *imported; /* the imported FMAObjectItem-derived object,
or %NULL */
FMAIImporter *importer; /* the importer module, or %NULL */
/* phase 2: check for pre-existence
diff --git a/src/core/na-io-provider.c b/src/core/na-io-provider.c
index 2ab431b..cdcf96a 100644
--- a/src/core/na-io-provider.c
+++ b/src/core/na-io-provider.c
@@ -35,7 +35,7 @@
#include <string.h>
#include <api/fma-iio-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-core-utils.h>
#include "na-iprefs.h"
@@ -97,9 +97,9 @@ static gboolean is_finally_writable( const NAIOProvider *provider, const NA
static GList *load_items_filter_unwanted_items( const NAPivot *pivot, GList *merged, guint
loadable_set );
static GList *load_items_filter_unwanted_items_rec( GList *merged, guint loadable_set );
static GList *load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **messages
);
-static GList *load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty,
NAObjectItem *parent );
+static GList *load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty,
FMAObjectItem *parent );
static GList *load_items_hierarchy_sort( const NAPivot *pivot, GList *tree, GCompareFunc fn );
-static gint peek_item_by_id_compare( const NAObject *obj, const gchar *id );
+static gint peek_item_by_id_compare( const FMAObject *obj, const gchar *id );
static NAIOProvider *peek_provider_by_id( const GList *providers, const gchar *id );
GType
@@ -841,10 +841,10 @@ na_io_provider_is_finally_writable( const NAIOProvider *provider, guint *reason
* Loads the tree from I/O storage subsystems.
*
* Returns: a #GList of newly allocated objects as a hierarchical tree
- * in display order. This tree contains #NAObjectMenu menus, along with
- * #NAObjectAction actions and their #NAObjectProfile profiles.
+ * in display order. This tree contains #FMAObjectMenu menus, along with
+ * #FMAObjectAction actions and their #FMAObjectProfile profiles.
*
- * The returned list should be na_object_free_items().
+ * The returned list should be fma_object_free_items().
*/
GList *
na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **messages )
@@ -892,11 +892,11 @@ na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **me
order_mode = na_iprefs_get_order_mode( NULL );
switch( order_mode ){
case IPREFS_ORDER_ALPHA_ASCENDING:
- hierarchy = load_items_hierarchy_sort( pivot, hierarchy, ( GCompareFunc )
na_object_id_sort_alpha_asc );
+ hierarchy = load_items_hierarchy_sort( pivot, hierarchy, ( GCompareFunc )
fma_object_id_sort_alpha_asc );
break;
case IPREFS_ORDER_ALPHA_DESCENDING:
- hierarchy = load_items_hierarchy_sort( pivot, hierarchy, ( GCompareFunc )
na_object_id_sort_alpha_desc );
+ hierarchy = load_items_hierarchy_sort( pivot, hierarchy, ( GCompareFunc )
fma_object_id_sort_alpha_desc );
break;
case IPREFS_ORDER_MANUAL:
@@ -910,7 +910,7 @@ na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **me
g_list_free( hierarchy );
g_debug( "%s: tree after filtering and reordering (if any)", thisfn );
- na_object_dump_tree( filtered );
+ fma_object_dump_tree( filtered );
g_debug( "%s: end of tree", thisfn );
return( filtered );
@@ -1025,7 +1025,7 @@ load_items_filter_unwanted_items( const NAPivot *pivot, GList *hierarchy, guint
GList *filtered;
for( it = hierarchy ; it ; it = it->next ){
- na_object_check_status( it->data );
+ fma_object_check_status( it->data );
}
filtered = load_items_filter_unwanted_items_rec( hierarchy, loadable_set );
@@ -1059,34 +1059,34 @@ load_items_filter_unwanted_items_rec( GList *hierarchy, guint loadable_set )
itnext = it->next;
selected = FALSE;
is_enabled = FALSE;
- is_valid = na_object_is_valid( it->data );
+ is_valid = fma_object_is_valid( it->data );
- if( NA_IS_OBJECT_PROFILE( it->data )){
+ if( FMA_IS_OBJECT_PROFILE( it->data )){
if( is_valid || load_invalid ){
filtered = g_list_append( filtered, it->data );
selected = TRUE;
}
}
- if( NA_IS_OBJECT_ITEM( it->data )){
- is_enabled = na_object_is_enabled( it->data );
+ if( FMA_IS_OBJECT_ITEM( it->data )){
+ is_enabled = fma_object_is_enabled( it->data );
if(( is_enabled || load_disabled ) && ( is_valid || load_invalid )){
- subitems = na_object_get_items( it->data );
+ subitems = fma_object_get_items( it->data );
subitems_f = load_items_filter_unwanted_items_rec( subitems, loadable_set );
- na_object_set_items( it->data, subitems_f );
+ fma_object_set_items( it->data, subitems_f );
filtered = g_list_append( filtered, it->data );
selected = TRUE;
}
}
if( !selected ){
- label = na_object_get_label( it->data );
+ label = fma_object_get_label( it->data );
g_debug( "%s: filtering %p (%s) '%s': valid=%s, enabled=%s",
thisfn, ( void * ) it->data, G_OBJECT_TYPE_NAME( it->data ), label,
is_valid ? "true":"false", is_enabled ? "true":"false" );
g_free( label );
- na_object_unref( it->data );
+ fma_object_unref( it->data );
}
}
@@ -1123,8 +1123,8 @@ load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **m
items = FMA_IIO_PROVIDER_GET_INTERFACE( provider_module )->read_items(
provider_module, messages );
for( it = items ; it ; it = it->next ){
- na_object_set_provider( it->data, provider_object );
- na_object_dump( it->data );
+ fma_object_set_provider( it->data, provider_object );
+ fma_object_dump( it->data );
}
merged = g_list_concat( merged, items );
@@ -1141,7 +1141,7 @@ load_items_get_merged_list( const NAPivot *pivot, guint loadable_set, GSList **m
* output list.
*/
static GList *
-load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty, NAObjectItem *parent )
+load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_empty, FMAObjectItem *parent )
{
static const gchar *thisfn = "na_io_provider_load_items_hierarchy_build";
GList *hierarchy, *it;
@@ -1157,17 +1157,17 @@ load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_e
it = g_list_find_custom( *tree, ilevel->data, ( GCompareFunc )
peek_item_by_id_compare );
if( it ){
hierarchy = g_list_append( hierarchy, it->data );
- na_object_set_parent( it->data, parent );
+ fma_object_set_parent( it->data, parent );
g_debug( "%s: id=%s: %s (%p) appended to hierarchy %p",
thisfn, ( gchar * ) ilevel->data, G_OBJECT_TYPE_NAME(
it->data ), ( void * ) it->data, ( void * ) hierarchy );
*tree = g_list_remove_link( *tree, it );
- if( NA_IS_OBJECT_MENU( it->data )){
- subitems_ids = na_object_get_items_slist( it->data );
- subitems = load_items_hierarchy_build( tree, subitems_ids, FALSE,
NA_OBJECT_ITEM( it->data ));
- na_object_set_items( it->data, subitems );
+ if( FMA_IS_OBJECT_MENU( it->data )){
+ subitems_ids = fma_object_get_items_slist( it->data );
+ subitems = load_items_hierarchy_build( tree, subitems_ids, FALSE,
FMA_OBJECT_ITEM( it->data ));
+ fma_object_set_items( it->data, subitems );
fma_core_utils_slist_free( subitems_ids );
}
}
@@ -1180,7 +1180,7 @@ load_items_hierarchy_build( GList **tree, GSList *level_zero, gboolean list_if_e
else if( list_if_empty ){
for( it = *tree ; it ; it = it->next ){
hierarchy = g_list_append( hierarchy, it->data );
- na_object_set_parent( it->data, parent );
+ fma_object_set_parent( it->data, parent );
}
g_list_free( *tree );
*tree = NULL;
@@ -1200,10 +1200,10 @@ load_items_hierarchy_sort( const NAPivot *pivot, GList *tree, GCompareFunc fn )
/* recursively sort each level of the tree
*/
for( it = sorted ; it ; it = it->next ){
- if( NA_IS_OBJECT_MENU( it->data )){
- items = na_object_get_items( it->data );
+ if( FMA_IS_OBJECT_MENU( it->data )){
+ items = fma_object_get_items( it->data );
items = load_items_hierarchy_sort( pivot, items, fn );
- na_object_set_items( it->data, items );
+ fma_object_set_items( it->data, items );
}
}
@@ -1214,13 +1214,13 @@ load_items_hierarchy_sort( const NAPivot *pivot, GList *tree, GCompareFunc fn )
* returns zero when @obj has the required @id
*/
static gint
-peek_item_by_id_compare( const NAObject *obj, const gchar *id )
+peek_item_by_id_compare( const FMAObject *obj, const gchar *id )
{
gchar *obj_id;
gint ret = 1;
- if( NA_IS_OBJECT_ITEM( obj )){
- obj_id = na_object_get_id( obj );
+ if( FMA_IS_OBJECT_ITEM( obj )){
+ obj_id = fma_object_get_id( obj );
ret = strcmp( obj_id, id );
g_free( obj_id );
}
@@ -1231,7 +1231,7 @@ peek_item_by_id_compare( const NAObject *obj, const gchar *id )
/*
* na_io_provider_write_item:
* @provider: this #NAIOProvider object.
- * @item: a #NAObjectItem to be written to the storage subsystem.
+ * @item: a #FMAObjectItem to be written to the storage subsystem.
* @messages: error messages.
*
* Writes an @item to the storage subsystem.
@@ -1244,7 +1244,7 @@ peek_item_by_id_compare( const NAObject *obj, const gchar *id )
* storage subsystem.
*/
guint
-na_io_provider_write_item( const NAIOProvider *provider, const NAObjectItem *item, GSList **messages )
+na_io_provider_write_item( const NAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "na_io_provider_write_item";
guint ret;
@@ -1257,14 +1257,14 @@ na_io_provider_write_item( const NAIOProvider *provider, const NAObjectItem *ite
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
g_return_val_if_fail( FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->write_item, ret
);
ret = FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->write_item(
provider->private->provider, item, messages );
if( ret == FMA_IIO_PROVIDER_CODE_OK ){
- na_object_set_provider( item, provider );
+ fma_object_set_provider( item, provider );
}
return( ret );
@@ -1273,7 +1273,7 @@ na_io_provider_write_item( const NAIOProvider *provider, const NAObjectItem *ite
/*
* na_io_provider_delete_item:
* @provider: this #NAIOProvider object.
- * @item: the #NAObjectItem item to be deleted.
+ * @item: the #FMAObjectItem item to be deleted.
* @messages: error messages.
*
* Deletes an item (action or menu) from the storage subsystem.
@@ -1281,7 +1281,7 @@ na_io_provider_write_item( const NAIOProvider *provider, const NAObjectItem *ite
* Returns: the FMAIIOProvider return code.
*/
guint
-na_io_provider_delete_item( const NAIOProvider *provider, const NAObjectItem *item, GSList **messages )
+na_io_provider_delete_item( const NAIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "na_io_provider_delete_item";
guint ret;
@@ -1294,7 +1294,7 @@ na_io_provider_delete_item( const NAIOProvider *provider, const NAObjectItem *it
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
g_return_val_if_fail( FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->delete_item, ret
);
@@ -1306,8 +1306,8 @@ na_io_provider_delete_item( const NAIOProvider *provider, const NAObjectItem *it
/*
* na_io_provider_duplicate_data:
* @provider: this #NAIOProvider object.
- * @dest: the target #NAObjectItem item.
- * @source: the source #NAObjectItem item.
+ * @dest: the target #FMAObjectItem item.
+ * @source: the source #FMAObjectItem item.
* @messages: error messages.
*
* Duplicates provider data (if any) from @source to @dest.
@@ -1315,7 +1315,7 @@ na_io_provider_delete_item( const NAIOProvider *provider, const NAObjectItem *it
* Returns: the FMAIIOProvider return code.
*/
guint
-na_io_provider_duplicate_data( const NAIOProvider *provider, NAObjectItem *dest, const NAObjectItem *source,
GSList **messages )
+na_io_provider_duplicate_data( const NAIOProvider *provider, FMAObjectItem *dest, const FMAObjectItem
*source, GSList **messages )
{
static const gchar *thisfn = "na_io_provider_duplicate_data";
guint ret;
@@ -1330,12 +1330,12 @@ na_io_provider_duplicate_data( const NAIOProvider *provider, NAObjectItem *dest,
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
g_return_val_if_fail( NA_IS_IO_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( dest ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( source ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( dest ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( source ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider->private->provider ), ret );
- na_object_set_provider_data( dest, NULL );
- provider_data = na_object_get_provider_data( source );
+ fma_object_set_provider_data( dest, NULL );
+ provider_data = fma_object_get_provider_data( source );
if( provider_data &&
FMA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->duplicate_data ){
diff --git a/src/core/na-io-provider.h b/src/core/na-io-provider.h
index 361e5d3..7046575 100644
--- a/src/core/na-io-provider.h
+++ b/src/core/na-io-provider.h
@@ -109,9 +109,9 @@ gboolean na_io_provider_is_finally_writable( const NAIOProvider *provider,
GList *na_io_provider_load_items( const NAPivot *pivot, guint loadable_set, GSList **messages );
-guint na_io_provider_write_item ( const NAIOProvider *provider, const NAObjectItem *item, GSList
**messages );
-guint na_io_provider_delete_item ( const NAIOProvider *provider, const NAObjectItem *item, GSList
**messages );
-guint na_io_provider_duplicate_data( const NAIOProvider *provider, NAObjectItem *dest, const
NAObjectItem *source, GSList **messages );
+guint na_io_provider_write_item ( const NAIOProvider *provider, const FMAObjectItem *item, GSList
**messages );
+guint na_io_provider_delete_item ( const NAIOProvider *provider, const FMAObjectItem *item, GSList
**messages );
+guint na_io_provider_duplicate_data( const NAIOProvider *provider, FMAObjectItem *dest, const
FMAObjectItem *source, GSList **messages );
gchar *na_io_provider_get_readonly_tooltip ( guint reason );
gchar *na_io_provider_get_return_code_label( guint code );
diff --git a/src/core/na-iprefs.c b/src/core/na-iprefs.c
index f4cc478..8ade89b 100644
--- a/src/core/na-iprefs.c
+++ b/src/core/na-iprefs.c
@@ -192,7 +192,7 @@ na_iprefs_write_level_zero( const GList *items, GSList **messages )
content = NULL;
for( it = items ; it ; it = it->next ){
- id = na_object_get_id( it->data );
+ id = fma_object_get_id( it->data );
content = g_slist_prepend( content, id );
}
content = g_slist_reverse( content );
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index 51c29f0..799bdeb 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -98,7 +98,7 @@ static void instance_set_property( GObject *object, guint property_id,
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static NAObjectItem *get_item_from_tree( const NAPivot *pivot, GList *tree, const gchar *id );
+static FMAObjectItem *get_item_from_tree( const NAPivot *pivot, GList *tree, const gchar *id );
/* FMAIIOProvider management */
static void on_items_changed_timeout( NAPivot *pivot );
@@ -245,8 +245,8 @@ instance_constructed( GObject *object )
/* force class initialization and io-factory registration
*/
- g_object_unref( na_object_action_new_with_profile());
- g_object_unref( na_object_menu_new());
+ g_object_unref( fma_object_action_new_with_profile());
+ g_object_unref( fma_object_menu_new());
}
}
@@ -325,8 +325,8 @@ instance_dispose( GObject *object )
/* release item tree */
g_debug( "%s: tree=%p (count=%u)", thisfn,
( void * ) self->private->tree, g_list_length( self->private->tree ));
- na_object_dump_tree( self->private->tree );
- self->private->tree = na_object_free_items( self->private->tree );
+ fma_object_dump_tree( self->private->tree );
+ self->private->tree = fma_object_free_items( self->private->tree );
/* release the settings */
na_settings_free();
@@ -476,16 +476,16 @@ na_pivot_free_providers( GList *providers )
*
* Returns the specified item, action or menu.
*
- * Returns: the required #NAObjectItem-derived object, or %NULL if not
+ * Returns: the required #FMAObjectItem-derived object, or %NULL if not
* found.
*
* The returned pointer is owned by #NAPivot, and should not be
* g_free() nor g_object_unref() by the caller.
*/
-NAObjectItem *
+FMAObjectItem *
na_pivot_get_item( const NAPivot *pivot, const gchar *id )
{
- NAObjectItem *object = NULL;
+ FMAObjectItem *object = NULL;
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
@@ -501,22 +501,22 @@ na_pivot_get_item( const NAPivot *pivot, const gchar *id )
return( object );
}
-static NAObjectItem *
+static FMAObjectItem *
get_item_from_tree( const NAPivot *pivot, GList *tree, const gchar *id )
{
GList *subitems, *ia;
- NAObjectItem *found = NULL;
+ FMAObjectItem *found = NULL;
for( ia = tree ; ia && !found ; ia = ia->next ){
- gchar *i_id = na_object_get_id( NA_OBJECT( ia->data ));
+ gchar *i_id = fma_object_get_id( FMA_OBJECT( ia->data ));
if( !g_ascii_strcasecmp( id, i_id )){
- found = NA_OBJECT_ITEM( ia->data );
+ found = FMA_OBJECT_ITEM( ia->data );
}
- if( !found && NA_IS_OBJECT_ITEM( ia->data )){
- subitems = na_object_get_items( ia->data );
+ if( !found && FMA_IS_OBJECT_ITEM( ia->data )){
+ subitems = fma_object_get_items( ia->data );
found = get_item_from_tree( pivot, subitems, id );
}
}
@@ -569,7 +569,7 @@ na_pivot_load_items( NAPivot *pivot )
g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
messages = NULL;
- na_object_free_items( pivot->private->tree );
+ fma_object_free_items( pivot->private->tree );
pivot->private->tree = na_io_provider_load_items( pivot, pivot->private->loadable_set,
&messages );
for( im = messages ; im ; im = im->next ){
@@ -600,7 +600,7 @@ na_pivot_set_new_items( NAPivot *pivot, GList *items )
g_debug( "%s: pivot=%p, items=%p (count=%d)",
thisfn, ( void * ) pivot, ( void * ) items, items ? g_list_length( items ) :
0 );
- na_object_free_items( pivot->private->tree );
+ fma_object_free_items( pivot->private->tree );
pivot->private->tree = items;
}
}
diff --git a/src/core/na-pivot.h b/src/core/na-pivot.h
index bc511dc..122a78d 100644
--- a/src/core/na-pivot.h
+++ b/src/core/na-pivot.h
@@ -73,7 +73,7 @@
*/
#include <api/fma-iio-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-settings.h"
@@ -145,7 +145,7 @@ void na_pivot_free_providers( GList *providers );
/* Items, menus and actions, management
*/
-NAObjectItem *na_pivot_get_item ( const NAPivot *pivot, const gchar *id );
+FMAObjectItem *na_pivot_get_item ( const NAPivot *pivot, const gchar *id );
GList *na_pivot_get_items ( const NAPivot *pivot );
void na_pivot_load_items ( NAPivot *pivot );
void na_pivot_set_new_items( NAPivot *pivot, GList *tree );
diff --git a/src/core/na-tokens.c b/src/core/na-tokens.c
index ab58b52..c7fd56f 100644
--- a/src/core/na-tokens.c
+++ b/src/core/na-tokens.c
@@ -37,7 +37,7 @@
#include <string.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-gnome-vfs-uri.h"
#include "na-selected-info.h"
@@ -89,7 +89,7 @@ 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 NAObjectProfile *profile, const NATokens
*tokens );
+static void execute_action_command( gchar *command, const FMAObjectProfile *profile, const NATokens
*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 );
@@ -374,20 +374,20 @@ na_tokens_parse_for_display( const NATokens *tokens, const gchar *string, gboole
/*
* na_tokens_execute_action:
* @tokens: a #NATokens object.
- * @profile: the #NAObjectProfile to be executed.
+ * @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 NAObjectProfile *profile )
+na_tokens_execute_action( const NATokens *tokens, const FMAObjectProfile *profile )
{
gchar *path, *parameters, *exec;
gboolean singular;
guint i;
gchar *command;
- path = na_object_get_path( profile );
- parameters = na_object_get_parameters( profile );
+ path = fma_object_get_path( profile );
+ parameters = fma_object_get_parameters( profile );
exec = g_strdup_printf( "%s %s", path, parameters );
g_free( parameters );
g_free( path );
@@ -492,7 +492,7 @@ display_output_get_content( int fd )
* - DisplayOutput: execute in a shell
*/
static void
-execute_action_command( gchar *command, const NAObjectProfile *profile, const NATokens *tokens )
+execute_action_command( gchar *command, const FMAObjectProfile *profile, const NATokens *tokens )
{
static const gchar *thisfn = "nautilus_actions_execute_action_command";
GError *error;
@@ -509,7 +509,7 @@ execute_action_command( gchar *command, const NAObjectProfile *profile, const NA
run_command = NULL;
child_str = g_new0( ChildStr, 1 );
child_pid = ( GPid ) 0;
- execution_mode = na_object_get_execution_mode( profile );
+ execution_mode = fma_object_get_execution_mode( profile );
if( !strcmp( execution_mode, "Normal" )){
run_command = get_command_execution_normal( command );
@@ -536,7 +536,7 @@ execute_action_command( gchar *command, const NAObjectProfile *profile, const NA
g_error_free( error );
} else {
- wdir = na_object_get_working_dir( profile );
+ wdir = fma_object_get_working_dir( profile );
wdir_nq = parse_singular( tokens, wdir, 0, FALSE, FALSE );
g_debug( "%s: run_command=%s, wdir=%s", thisfn, run_command, wdir_nq );
diff --git a/src/core/na-tokens.h b/src/core/na-tokens.h
index 6b36b9c..96d6f44 100644
--- a/src/core/na-tokens.h
+++ b/src/core/na-tokens.h
@@ -51,7 +51,7 @@
* - src/core/na-tokens.c::is_singular_exec() function
* - src/core/na-tokens.c::parse_singular() function
* - src/nact/file-manager-actions-config-tool.ui:LegendDialog labels
- * - src/core/na-object-profile-factory.c:FMAFO_DATA_PARAMETERS comment
+ * - src/core/fma-object-profile-factory.c:FMAFO_DATA_PARAMETERS comment
*
* Valid parameters are :
*
@@ -79,7 +79,7 @@
* %%: the « % » character
*/
-#include <api/na-object-profile.h>
+#include <api/fma-object-profile.h>
G_BEGIN_DECLS
@@ -114,7 +114,7 @@ NATokens *na_tokens_new_for_example ( void );
NATokens *na_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 NAObjectProfile *profile );
+void na_tokens_execute_action ( const NATokens *tokens, const FMAObjectProfile *profile );
gchar *na_tokens_command_for_terminal( const gchar *pattern, const gchar *command );
diff --git a/src/core/na-updater.c b/src/core/na-updater.c
index 2fea621..fefcb81 100644
--- a/src/core/na-updater.c
+++ b/src/core/na-updater.c
@@ -33,7 +33,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-gconf-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "na-io-provider.h"
#include "na-settings.h"
@@ -63,7 +63,7 @@ static void instance_finalize( GObject *object );
static gboolean are_preferences_locked( const NAUpdater *updater );
static gboolean is_level_zero_writable( const NAUpdater *updater );
-static void set_writability_status( NAObjectItem *item, const NAUpdater *updater );
+static void set_writability_status( FMAObjectItem *item, const NAUpdater *updater );
GType
na_updater_get_type( void )
@@ -235,7 +235,7 @@ is_level_zero_writable( const NAUpdater *updater )
/*
* na_updater_check_item_writability_status:
* @updater: this #NAUpdater object.
- * @item: the #NAObjectItem to be written.
+ * @item: the #FMAObjectItem to be written.
*
* Compute and set the writability status of the @item.
*
@@ -248,15 +248,15 @@ is_level_zero_writable( const NAUpdater *updater )
* If the item does not have a parent, then the level zero must be writable.
*/
void
-na_updater_check_item_writability_status( const NAUpdater *updater, const NAObjectItem *item )
+na_updater_check_item_writability_status( const NAUpdater *updater, const FMAObjectItem *item )
{
gboolean writable;
NAIOProvider *provider;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
guint reason;
g_return_if_fail( NA_IS_UPDATER( updater ));
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
writable = FALSE;
reason = FMA_IIO_PROVIDER_STATUS_UNDETERMINED;
@@ -274,14 +274,14 @@ na_updater_check_item_writability_status( const NAUpdater *updater, const NAObje
* this status each time we need it, and enough for our needs..
*/
if( writable ){
- if( na_object_is_readonly( item )){
+ if( fma_object_is_readonly( item )){
writable = FALSE;
reason = FMA_IIO_PROVIDER_STATUS_ITEM_READONLY;
}
}
if( writable ){
- provider = na_object_get_provider( item );
+ provider = fma_object_get_provider( item );
if( provider ){
writable = na_io_provider_is_finally_writable( provider, &reason );
@@ -299,7 +299,7 @@ na_updater_check_item_writability_status( const NAUpdater *updater, const NAObje
/* if needed, the level zero must be writable
*/
if( writable ){
- parent = ( NAObjectItem * ) na_object_get_parent( item );
+ parent = ( FMAObjectItem * ) fma_object_get_parent( item );
if( !parent ){
if( updater->private->is_level_zero_writable ){
reason = FMA_IIO_PROVIDER_STATUS_LEVEL_ZERO;
@@ -308,7 +308,7 @@ na_updater_check_item_writability_status( const NAUpdater *updater, const NAObje
}
}
- na_object_set_writability_status( item, writable, reason );
+ fma_object_set_writability_status( item, writable, reason );
}
/*
@@ -374,17 +374,17 @@ na_updater_is_level_zero_writable( const NAUpdater *updater )
/*
* na_updater_append_item:
* @updater: this #NAUpdater object.
- * @item: a #NAObjectItem-derived object to be appended to the tree.
+ * @item: a #FMAObjectItem-derived object to be appended to the tree.
*
* Append a new item at the end of the global tree.
*/
void
-na_updater_append_item( NAUpdater *updater, NAObjectItem *item )
+na_updater_append_item( NAUpdater *updater, FMAObjectItem *item )
{
GList *tree;
g_return_if_fail( NA_IS_UPDATER( updater ));
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
if( !updater->private->dispose_has_run ){
@@ -397,20 +397,20 @@ na_updater_append_item( NAUpdater *updater, NAObjectItem *item )
/*
* na_updater_insert_item:
* @updater: this #NAUpdater object.
- * @item: a #NAObjectItem-derived object to be inserted in the tree.
+ * @item: a #FMAObjectItem-derived object to be inserted in the tree.
* @parent_id: the id of the parent, or %NULL.
* @pos: the position in the children of the parent, starting at zero, or -1.
*
* Insert a new item in the global tree.
*/
void
-na_updater_insert_item( NAUpdater *updater, NAObjectItem *item, const gchar *parent_id, gint pos )
+na_updater_insert_item( NAUpdater *updater, FMAObjectItem *item, const gchar *parent_id, gint pos )
{
GList *tree;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
g_return_if_fail( NA_IS_UPDATER( updater ));
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( item ));
if( !updater->private->dispose_has_run ){
@@ -422,7 +422,7 @@ na_updater_insert_item( NAUpdater *updater, NAObjectItem *item, const gchar *par
}
if( parent ){
- na_object_insert_at( parent, item, pos );
+ fma_object_insert_at( parent, item, pos );
} else {
tree = g_list_append( tree, item );
@@ -434,15 +434,15 @@ na_updater_insert_item( NAUpdater *updater, NAObjectItem *item, const gchar *par
/*
* na_updater_remove_item:
* @updater: this #NAPivot instance.
- * @item: the #NAObjectItem to be removed from the list.
+ * @item: the #FMAObjectItem to be removed from the list.
*
- * Removes a #NAObjectItem from the hierarchical tree. Does not delete it.
+ * Removes a #FMAObjectItem from the hierarchical tree. Does not delete it.
*/
void
-na_updater_remove_item( NAUpdater *updater, NAObject *item )
+na_updater_remove_item( NAUpdater *updater, FMAObject *item )
{
GList *tree;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
g_return_if_fail( NA_IS_PIVOT( updater ));
@@ -452,11 +452,11 @@ na_updater_remove_item( NAUpdater *updater, NAObject *item )
( void * ) updater,
( void * ) item, G_IS_OBJECT( item ) ? G_OBJECT_TYPE_NAME( item ) : "(null)"
);
- parent = na_object_get_parent( item );
+ parent = fma_object_get_parent( item );
if( parent ){
- tree = na_object_get_items( parent );
+ tree = fma_object_get_items( parent );
tree = g_list_remove( tree, ( gconstpointer ) item );
- na_object_set_items( parent, tree );
+ fma_object_set_items( parent, tree );
} else {
g_object_get( G_OBJECT( updater ), PIVOT_PROP_TREE, &tree, NULL );
@@ -469,25 +469,25 @@ na_updater_remove_item( NAUpdater *updater, NAObject *item )
/**
* na_updater_should_pasted_be_relabeled:
* @updater: this #NAUpdater instance.
- * @object: the considered #NAObject-derived object.
+ * @object: the considered #FMAObject-derived object.
*
* Whether the specified object should be relabeled when pasted ?
*
* Returns: %TRUE if the object should be relabeled, %FALSE else.
*/
gboolean
-na_updater_should_pasted_be_relabeled( const NAUpdater *updater, const NAObject *item )
+na_updater_should_pasted_be_relabeled( const NAUpdater *updater, const FMAObject *item )
{
static const gchar *thisfn = "na_updater_should_pasted_be_relabeled";
gboolean relabel;
- if( NA_IS_OBJECT_MENU( item )){
+ if( FMA_IS_OBJECT_MENU( item )){
relabel = na_settings_get_boolean( NA_IPREFS_RELABEL_DUPLICATE_MENU, NULL, NULL );
- } else if( NA_IS_OBJECT_ACTION( item )){
+ } else if( FMA_IS_OBJECT_ACTION( item )){
relabel = na_settings_get_boolean( NA_IPREFS_RELABEL_DUPLICATE_ACTION, NULL, NULL );
- } else if( NA_IS_OBJECT_PROFILE( item )){
+ } else if( FMA_IS_OBJECT_PROFILE( item )){
relabel = na_settings_get_boolean( NA_IPREFS_RELABEL_DUPLICATE_PROFILE, NULL, NULL );
} else {
@@ -530,14 +530,14 @@ na_updater_load_items( NAUpdater *updater )
}
static void
-set_writability_status( NAObjectItem *item, const NAUpdater *updater )
+set_writability_status( FMAObjectItem *item, const NAUpdater *updater )
{
GList *children;
na_updater_check_item_writability_status( updater, item );
- if( NA_IS_OBJECT_MENU( item )){
- children = na_object_get_items( item );
+ if( FMA_IS_OBJECT_MENU( item )){
+ children = fma_object_get_items( item );
g_list_foreach( children, ( GFunc ) set_writability_status, ( gpointer ) updater );
}
}
@@ -545,7 +545,7 @@ set_writability_status( NAObjectItem *item, const NAUpdater *updater )
/*
* na_updater_write_item:
* @updater: this #NAUpdater instance.
- * @item: a #NAObjectItem to be written down to the storage subsystem.
+ * @item: a #FMAObjectItem to be written down to the storage subsystem.
* @messages: the I/O provider can allocate and store here its error
* messages.
*
@@ -554,19 +554,19 @@ set_writability_status( NAObjectItem *item, const NAUpdater *updater )
* Returns: the #FMAIIOProvider return code.
*/
guint
-na_updater_write_item( const NAUpdater *updater, NAObjectItem *item, GSList **messages )
+na_updater_write_item( const NAUpdater *updater, FMAObjectItem *item, GSList **messages )
{
guint ret;
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
g_return_val_if_fail( NA_IS_UPDATER( updater ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( messages, ret );
if( !updater->private->dispose_has_run ){
- NAIOProvider *provider = na_object_get_provider( item );
+ NAIOProvider *provider = fma_object_get_provider( item );
if( !provider ){
provider = na_io_provider_find_writable_io_provider( NA_PIVOT( updater ));
@@ -584,7 +584,7 @@ na_updater_write_item( const NAUpdater *updater, NAObjectItem *item, GSList **me
/*
* na_updater_delete_item:
* @updater: this #NAUpdater instance.
- * @item: the #NAObjectItem to be deleted from the storage subsystem.
+ * @item: the #FMAObjectItem to be deleted from the storage subsystem.
* @messages: the I/O provider can allocate and store here its error
* messages.
*
@@ -596,20 +596,20 @@ na_updater_write_item( const NAUpdater *updater, NAObjectItem *item, GSList **me
* doesn't have any attached provider. We so do nothing and return OK...
*/
guint
-na_updater_delete_item( const NAUpdater *updater, const NAObjectItem *item, GSList **messages )
+na_updater_delete_item( const NAUpdater *updater, const FMAObjectItem *item, GSList **messages )
{
guint ret;
NAIOProvider *provider;
g_return_val_if_fail( NA_IS_UPDATER( updater ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( messages, FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
ret = FMA_IIO_PROVIDER_CODE_OK;
if( !updater->private->dispose_has_run ){
- provider = na_object_get_provider( item );
+ provider = fma_object_get_provider( item );
/* provider may be NULL if the item has been deleted from the UI
* without having been ever saved
diff --git a/src/core/na-updater.h b/src/core/na-updater.h
index 94a2c2d..395e76b 100644
--- a/src/core/na-updater.h
+++ b/src/core/na-updater.h
@@ -73,24 +73,24 @@ NAUpdater *na_updater_new( void );
/* writability status
*/
-void na_updater_check_item_writability_status( const NAUpdater *updater, const NAObjectItem *item );
+void na_updater_check_item_writability_status( const NAUpdater *updater, const FMAObjectItem *item );
gboolean na_updater_are_preferences_locked ( const NAUpdater *updater );
gboolean na_updater_is_level_zero_writable ( const NAUpdater *updater );
/* update the tree in memory
*/
-void na_updater_append_item( NAUpdater *updater, NAObjectItem *item );
-void na_updater_insert_item( NAUpdater *updater, NAObjectItem *item, const gchar *parent_id, gint pos
);
-void na_updater_remove_item( NAUpdater *updater, NAObject *item );
+void na_updater_append_item( NAUpdater *updater, FMAObjectItem *item );
+void na_updater_insert_item( NAUpdater *updater, FMAObjectItem *item, const gchar *parent_id, gint pos
);
+void na_updater_remove_item( NAUpdater *updater, FMAObject *item );
-gboolean na_updater_should_pasted_be_relabeled( const NAUpdater *updater, const NAObject *item );
+gboolean na_updater_should_pasted_be_relabeled( const NAUpdater *updater, const FMAObject *item );
/* read from / write to the physical storage subsystem
*/
GList *na_updater_load_items ( NAUpdater *updater );
-guint na_updater_write_item ( const NAUpdater *updater, NAObjectItem *item, GSList **messages );
-guint na_updater_delete_item( const NAUpdater *updater, const NAObjectItem *item, GSList **messages );
+guint na_updater_write_item ( const NAUpdater *updater, FMAObjectItem *item, GSList **messages );
+guint na_updater_delete_item( const NAUpdater *updater, const FMAObjectItem *item, GSList **messages );
G_END_DECLS
diff --git a/src/io-desktop/nadp-desktop-file.h b/src/io-desktop/nadp-desktop-file.h
index 201f885..687d594 100644
--- a/src/io-desktop/nadp-desktop-file.h
+++ b/src/io-desktop/nadp-desktop-file.h
@@ -37,7 +37,7 @@
*
* This class encapŝulates the EggDesktopFile structure, adding some
* private properties. An instance of this class is associated with
- * every #NAObjectItem for this provider.
+ * every #FMAObjectItem for this provider.
*/
#include <glib-object.h>
diff --git a/src/io-desktop/nadp-desktop-provider.h b/src/io-desktop/nadp-desktop-provider.h
index 2f01c41..9f70786 100644
--- a/src/io-desktop/nadp-desktop-provider.h
+++ b/src/io-desktop/nadp-desktop-provider.h
@@ -40,7 +40,7 @@
* should only be used through the FMAIIOProvider interface.
*/
-#include <api/na-object-item.h>
+#include <api/fma-object-item.h>
#include <api/na-timeout.h>
#include "nadp-desktop-file.h"
diff --git a/src/io-desktop/nadp-reader.c b/src/io-desktop/nadp-reader.c
index dd830b1..c1d4451 100644
--- a/src/io-desktop/nadp-reader.c
+++ b/src/io-desktop/nadp-reader.c
@@ -39,7 +39,7 @@
#include <api/fma-data-types.h>
#include <api/fma-ifactory-object-data.h>
#include <api/fma-ifactory-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "nadp-desktop-provider.h"
#include "nadp-keys.h"
@@ -57,7 +57,7 @@ typedef struct {
*/
typedef struct {
NadpDesktopFile *ndf;
- NAObjectAction *action;
+ FMAObjectAction *action;
}
NadpReaderData;
@@ -72,11 +72,11 @@ static FMAIFactoryObject *item_from_desktop_file( const NadpDesktopProvider *pro
static void desktop_weak_notify( NadpDesktopFile *ndf, GObject *item );
static void free_desktop_paths( GList *paths );
-static void read_start_read_subitems_key( const FMAIFactoryProvider *provider, NAObjectItem
*item, NadpReaderData *reader_data, GSList **messages );
-static void read_start_profile_attach_profile( const FMAIFactoryProvider *provider,
NAObjectProfile *profile, NadpReaderData *reader_data, GSList **messages );
+static void read_start_read_subitems_key( const FMAIFactoryProvider *provider, FMAObjectItem
*item, NadpReaderData *reader_data, GSList **messages );
+static void read_start_profile_attach_profile( const FMAIFactoryProvider *provider,
FMAObjectProfile *profile, NadpReaderData *reader_data, GSList **messages );
-static gboolean read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem
*item, NadpReaderData *reader_data, GSList **messages );
-static void read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAction
*action, NadpReaderData *data, GSList **messages );
+static gboolean read_done_item_is_writable( const FMAIFactoryProvider *provider, FMAObjectItem
*item, NadpReaderData *reader_data, GSList **messages );
+static void read_done_action_read_profiles( const FMAIFactoryProvider *provider,
FMAObjectAction *action, NadpReaderData *data, GSList **messages );
static void read_done_action_load_profile( const FMAIFactoryProvider *provider, NadpReaderData
*reader_data, const gchar *profile_id, GSList **messages );
/*
@@ -107,7 +107,7 @@ nadp_iio_provider_read_items( const FMAIIOProvider *provider, GSList **messages
if( item ){
items = g_list_prepend( items, item );
- na_object_dump( item );
+ fma_object_dump( item );
}
}
@@ -282,10 +282,10 @@ item_from_desktop_file( const NadpDesktopProvider *provider, NadpDesktopFile *nd
type = nadp_desktop_file_get_file_type( ndf );
if( !strcmp( type, NADP_VALUE_TYPE_ACTION )){
- item = FMA_IFACTORY_OBJECT( na_object_action_new());
+ item = FMA_IFACTORY_OBJECT( fma_object_action_new());
} else if( !strcmp( type, NADP_VALUE_TYPE_MENU )){
- item = FMA_IFACTORY_OBJECT( na_object_menu_new());
+ item = FMA_IFACTORY_OBJECT( fma_object_menu_new());
} else {
/* i18n: 'type' is the nature of the item: Action or Menu */
@@ -294,7 +294,7 @@ item_from_desktop_file( const NadpDesktopProvider *provider, NadpDesktopFile *nd
if( item ){
id = nadp_desktop_file_get_id( ndf );
- na_object_set_id( item, id );
+ fma_object_set_id( item, id );
g_free( id );
reader_data = g_new0( NadpReaderData, 1 );
@@ -302,7 +302,7 @@ item_from_desktop_file( const NadpDesktopProvider *provider, NadpDesktopFile *nd
fma_ifactory_provider_read_item( FMA_IFACTORY_PROVIDER( provider ), reader_data, item,
messages );
- na_object_set_provider_data( item, ndf );
+ fma_object_set_provider_data( item, ndf );
g_object_weak_ref( G_OBJECT( item ), ( GWeakNotify ) desktop_weak_notify, ndf );
g_free( reader_data );
@@ -384,23 +384,23 @@ nadp_reader_iimporter_import_from_uri( const FMAIImporter *instance, void *parms
ndf = nadp_desktop_file_new_from_uri( parms->uri );
if( ndf ){
- parms->imported = ( NAObjectItem * ) item_from_desktop_file(
+ parms->imported = ( FMAObjectItem * ) item_from_desktop_file(
( const NadpDesktopProvider * ) NADP_DESKTOP_PROVIDER( instance ),
ndf, &parms->messages );
if( parms->imported ){
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( parms->imported ),
IMPORTER_CODE_NOT_WILLING_TO );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( parms->imported ),
IMPORTER_CODE_NOT_WILLING_TO );
/* remove the weak reference on desktop file set by 'item_from_desktop_file'
- * as we must consider this #NAObjectItem as a new one
+ * as we must consider this #FMAObjectItem as a new one
*/
- na_object_set_provider_data( parms->imported, NULL );
+ fma_object_set_provider_data( parms->imported, NULL );
g_object_weak_unref( G_OBJECT( parms->imported ), ( GWeakNotify )
desktop_weak_notify, ndf );
g_object_unref( ndf );
/* also remove the 'writable' status'
*/
- na_object_set_readonly( parms->imported, FALSE );
+ fma_object_set_readonly( parms->imported, FALSE );
code = IMPORTER_CODE_OK;
}
@@ -416,7 +416,7 @@ nadp_reader_iimporter_import_from_uri( const FMAIImporter *instance, void *parms
/*
* at this time, the object has been allocated and its id has been set
* read here the subitems key, which may be 'Profiles' or 'ItemsList'
- * depending of the exact class of the NAObjectItem
+ * depending of the exact class of the FMAObjectItem
*/
void
nadp_reader_ifactory_provider_read_start( const FMAIFactoryProvider *reader, void *reader_data, const
FMAIFactoryObject *serializable, GSList **messages )
@@ -436,46 +436,46 @@ nadp_reader_ifactory_provider_read_start( const FMAIFactoryProvider *reader, voi
( void * ) serializable, G_OBJECT_TYPE_NAME( serializable ),
( void * ) messages );
- if( NA_IS_OBJECT_ITEM( serializable )){
- read_start_read_subitems_key( reader, NA_OBJECT_ITEM( serializable ), (
NadpReaderData * ) reader_data, messages );
- na_object_set_iversion( serializable, 3 );
+ if( FMA_IS_OBJECT_ITEM( serializable )){
+ read_start_read_subitems_key( reader, FMA_OBJECT_ITEM( serializable ), (
NadpReaderData * ) reader_data, messages );
+ fma_object_set_iversion( serializable, 3 );
}
- if( NA_IS_OBJECT_PROFILE( serializable )){
- read_start_profile_attach_profile( reader, NA_OBJECT_PROFILE( serializable ), (
NadpReaderData * ) reader_data, messages );
+ if( FMA_IS_OBJECT_PROFILE( serializable )){
+ read_start_profile_attach_profile( reader, FMA_OBJECT_PROFILE( serializable ), (
NadpReaderData * ) reader_data, messages );
}
}
}
static void
-read_start_read_subitems_key( const FMAIFactoryProvider *provider, NAObjectItem *item, NadpReaderData
*reader_data, GSList **messages )
+read_start_read_subitems_key( const FMAIFactoryProvider *provider, FMAObjectItem *item, NadpReaderData
*reader_data, GSList **messages )
{
GSList *subitems;
gboolean key_found;
subitems = nadp_desktop_file_get_string_list( reader_data->ndf,
NADP_GROUP_DESKTOP,
- NA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
+ FMA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
&key_found,
NULL );
if( key_found ){
- na_object_set_items_slist( item, subitems );
+ fma_object_set_items_slist( item, subitems );
}
fma_core_utils_slist_free( subitems );
}
static void
-read_start_profile_attach_profile( const FMAIFactoryProvider *provider, NAObjectProfile *profile,
NadpReaderData *reader_data, GSList **messages )
+read_start_profile_attach_profile( const FMAIFactoryProvider *provider, FMAObjectProfile *profile,
NadpReaderData *reader_data, GSList **messages )
{
- na_object_attach_profile( reader_data->action, profile );
+ fma_object_attach_profile( reader_data->action, profile );
}
/*
* reading any data from a desktop file requires:
* - a NadpDesktopFile object which has been initialized with the .desktop file
- * -> has been attached to the NAObjectItem in get_item() above
+ * -> has been attached to the FMAObjectItem in get_item() above
* - the data type (+ reading default value)
* - group and key names
*
@@ -509,12 +509,12 @@ nadp_reader_ifactory_provider_read_data( const FMAIFactoryProvider *reader, void
if( def->desktop_entry ){
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
group = g_strdup( NADP_GROUP_DESKTOP );
} else {
- g_return_val_if_fail( NA_IS_OBJECT_PROFILE( object ), NULL );
- id = na_object_get_id( object );
+ g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( object ), NULL );
+ id = fma_object_get_id( object );
group = g_strdup_printf( "%s %s", NADP_GROUP_PROFILE, id );
g_free( id );
}
@@ -599,13 +599,13 @@ nadp_reader_ifactory_provider_read_done( const FMAIFactoryProvider *reader, void
( void * ) serializable, G_OBJECT_TYPE_NAME( serializable ),
( void * ) messages );
- if( NA_IS_OBJECT_ITEM( serializable )){
- writable = read_done_item_is_writable( reader, NA_OBJECT_ITEM( serializable ), (
NadpReaderData * ) reader_data, messages );
- na_object_set_readonly( serializable, !writable );
+ if( FMA_IS_OBJECT_ITEM( serializable )){
+ writable = read_done_item_is_writable( reader, FMA_OBJECT_ITEM( serializable ), (
NadpReaderData * ) reader_data, messages );
+ fma_object_set_readonly( serializable, !writable );
}
- if( NA_IS_OBJECT_ACTION( serializable )){
- read_done_action_read_profiles( reader, NA_OBJECT_ACTION( serializable ), (
NadpReaderData * ) reader_data, messages );
+ if( FMA_IS_OBJECT_ACTION( serializable )){
+ read_done_action_read_profiles( reader, FMA_OBJECT_ACTION( serializable ), (
NadpReaderData * ) reader_data, messages );
}
g_debug( "%s: quitting for %s at %p", thisfn, G_OBJECT_TYPE_NAME( serializable ), ( void * )
serializable );
@@ -613,7 +613,7 @@ nadp_reader_ifactory_provider_read_done( const FMAIFactoryProvider *reader, void
}
static gboolean
-read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem *item, NadpReaderData
*reader_data, GSList **messages )
+read_done_item_is_writable( const FMAIFactoryProvider *provider, FMAObjectItem *item, NadpReaderData
*reader_data, GSList **messages )
{
NadpDesktopFile *ndf;
gchar *uri;
@@ -636,21 +636,21 @@ read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem *i
* - ensure that there is at least one profile attached to the action
*/
static void
-read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAction *action, NadpReaderData
*reader_data, GSList **messages )
+read_done_action_read_profiles( const FMAIFactoryProvider *provider, FMAObjectAction *action, NadpReaderData
*reader_data, GSList **messages )
{
static const gchar *thisfn = "nadp_reader_read_done_action_read_profiles";
GSList *order;
GSList *ip;
gchar *profile_id;
- NAObjectId *found;
- NAObjectProfile *profile;
+ FMAObjectId *found;
+ FMAObjectProfile *profile;
reader_data->action = action;
- order = na_object_get_items_slist( action );
+ order = fma_object_get_items_slist( action );
for( ip = order ; ip ; ip = ip->next ){
profile_id = ( gchar * ) ip->data;
- found = na_object_get_item( action, profile_id );
+ found = fma_object_get_item( action, profile_id );
if( !found ){
read_done_action_load_profile( provider, reader_data, profile_id, messages );
}
@@ -658,10 +658,10 @@ read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAct
fma_core_utils_slist_free( order );
- if( !na_object_get_items_count( action )){
+ if( !fma_object_get_items_count( action )){
g_warning( "%s: no profile found in .desktop file", thisfn );
- profile = na_object_profile_new_with_defaults();
- na_object_attach_profile( action, profile );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_attach_profile( action, profile );
}
}
@@ -669,12 +669,12 @@ static void
read_done_action_load_profile( const FMAIFactoryProvider *provider, NadpReaderData *reader_data, const gchar
*profile_id, GSList **messages )
{
static const gchar *thisfn = "nadp_reader_read_done_action_load_profile";
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
g_debug( "%s: loading profile=%s", thisfn, profile_id );
- profile = na_object_profile_new_with_defaults();
- na_object_set_id( profile, profile_id );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_set_id( profile, profile_id );
if( nadp_desktop_file_has_profile( reader_data->ndf, profile_id )){
fma_ifactory_provider_read_item(
@@ -685,6 +685,6 @@ read_done_action_load_profile( const FMAIFactoryProvider *provider, NadpReaderDa
} else {
g_warning( "%s: profile '%s' not found in .desktop file", thisfn, profile_id );
- na_object_attach_profile( reader_data->action, profile );
+ fma_object_attach_profile( reader_data->action, profile );
}
}
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 52f7f6a..92ec0c5 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -36,7 +36,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-data-types.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-ifactory-provider.h>
#include "nadp-desktop-file.h"
@@ -63,12 +63,12 @@ static ExportFormatFn st_export_format_fn[] = {
{ NULL }
};
-static guint write_item( const FMAIIOProvider *provider, const NAObjectItem *item, NadpDesktopFile
*ndf, GSList **messages );
+static guint write_item( const FMAIIOProvider *provider, const FMAObjectItem *item,
NadpDesktopFile *ndf, GSList **messages );
static void desktop_weak_notify( NadpDesktopFile *ndf, GObject *item );
-static void write_start_write_type( NadpDesktopFile *ndp, NAObjectItem *item );
-static void write_done_write_subitems_list( NadpDesktopFile *ndp, NAObjectItem *item );
+static void write_start_write_type( NadpDesktopFile *ndp, FMAObjectItem *item );
+static void write_done_write_subitems_list( NadpDesktopFile *ndp, FMAObjectItem *item );
static ExportFormatFn *find_export_format_fn( const gchar *format );
@@ -124,7 +124,7 @@ nadp_iio_provider_is_able_to_write( const FMAIIOProvider *provider )
* This is implementation of FMAIIOProvider::write_item method
*/
guint
-nadp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem *item, GSList **messages )
+nadp_iio_provider_write_item( const FMAIIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "nadp_iio_provider_write_item";
guint ret;
@@ -140,14 +140,14 @@ nadp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
ret = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
g_return_val_if_fail( NADP_IS_DESKTOP_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
- if( na_object_is_readonly( item )){
+ if( fma_object_is_readonly( item )){
g_warning( "%s: item=%p is read-only", thisfn, ( void * ) item );
return( ret );
}
- ndf = ( NadpDesktopFile * ) na_object_get_provider_data( item );
+ ndf = ( NadpDesktopFile * ) fma_object_get_provider_data( item );
/* write into the current key file and write it to current path */
if( ndf ){
@@ -171,7 +171,7 @@ nadp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
fma_core_utils_slist_free( subdirs );
if( dir_ok ){
- id = na_object_get_id( item );
+ id = fma_object_get_id( item );
bname = g_strdup_printf( "%s%s", id, NADP_DESKTOP_FILE_SUFFIX );
g_free( id );
path = g_build_filename( fulldir, bname, NULL );
@@ -181,7 +181,7 @@ nadp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
if( dir_ok ){
ndf = nadp_desktop_file_new_for_write( path );
- na_object_set_provider_data( item, ndf );
+ fma_object_set_provider_data( item, ndf );
g_object_weak_ref( G_OBJECT( item ), ( GWeakNotify ) desktop_weak_notify, ndf );
g_free( path );
}
@@ -205,7 +205,7 @@ nadp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
* -> as a side effect, we lose comments inside of these groups :(
*/
static guint
-write_item( const FMAIIOProvider *provider, const NAObjectItem *item, NadpDesktopFile *ndf, GSList
**messages )
+write_item( const FMAIIOProvider *provider, const FMAObjectItem *item, NadpDesktopFile *ndf, GSList
**messages )
{
static const gchar *thisfn = "nadp_iio_provider_write_item";
guint ret;
@@ -224,7 +224,7 @@ write_item( const FMAIIOProvider *provider, const NAObjectItem *item, NadpDeskto
g_return_val_if_fail( NADP_IS_DESKTOP_PROVIDER( provider ), ret );
g_return_val_if_fail( FMA_IS_IFACTORY_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( item ), ret );
g_return_val_if_fail( NADP_IS_DESKTOP_FILE( ndf ), ret );
@@ -247,7 +247,7 @@ write_item( const FMAIIOProvider *provider, const NAObjectItem *item, NadpDeskto
}
guint
-nadp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectItem *item, GSList **messages )
+nadp_iio_provider_delete_item( const FMAIIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "nadp_iio_provider_delete_item";
guint ret;
@@ -265,7 +265,7 @@ nadp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectIte
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider ), ret );
g_return_val_if_fail( NADP_IS_DESKTOP_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
self = NADP_DESKTOP_PROVIDER( provider );
@@ -273,7 +273,7 @@ nadp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectIte
return( FMA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN );
}
- ndf = ( NadpDesktopFile * ) na_object_get_provider_data( item );
+ ndf = ( NadpDesktopFile * ) fma_object_get_provider_data( item );
if( ndf ){
g_return_val_if_fail( NADP_IS_DESKTOP_FILE( ndf ), ret );
@@ -309,7 +309,7 @@ desktop_weak_notify( NadpDesktopFile *ndf, GObject *item )
* does not invalid duplicated pointer
*/
guint
-nadp_iio_provider_duplicate_data( const FMAIIOProvider *provider, NAObjectItem *dest, const NAObjectItem
*source, GSList **messages )
+nadp_iio_provider_duplicate_data( const FMAIIOProvider *provider, FMAObjectItem *dest, const FMAObjectItem
*source, GSList **messages )
{
static const gchar *thisfn = "nadp_iio_provider_duplicate_data";
guint ret;
@@ -327,8 +327,8 @@ nadp_iio_provider_duplicate_data( const FMAIIOProvider *provider, NAObjectItem *
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider ), ret );
g_return_val_if_fail( NADP_IS_DESKTOP_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( dest ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( source ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( dest ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( source ), ret );
self = NADP_DESKTOP_PROVIDER( provider );
@@ -336,9 +336,9 @@ nadp_iio_provider_duplicate_data( const FMAIIOProvider *provider, NAObjectItem *
return( FMA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN );
}
- ndf = ( NadpDesktopFile * ) na_object_get_provider_data( source );
+ ndf = ( NadpDesktopFile * ) fma_object_get_provider_data( source );
g_return_val_if_fail( ndf && NADP_IS_DESKTOP_FILE( ndf ), ret );
- na_object_set_provider_data( dest, g_object_ref( ndf ));
+ fma_object_set_provider_data( dest, g_object_ref( ndf ));
g_object_weak_ref( G_OBJECT( dest ), ( GWeakNotify ) desktop_weak_notify, ndf );
return( FMA_IIO_PROVIDER_CODE_OK );
@@ -365,7 +365,7 @@ nadp_writer_iexporter_export_to_buffer( const FMAIExporter *instance, FMAIExport
parms->buffer = NULL;
code = FMA_IEXPORTER_CODE_OK;
- if( !parms->exported || !NA_IS_OBJECT_ITEM( parms->exported )){
+ if( !parms->exported || !FMA_IS_OBJECT_ITEM( parms->exported )){
code = FMA_IEXPORTER_CODE_INVALID_ITEM;
}
@@ -425,7 +425,7 @@ nadp_writer_iexporter_export_to_file( const FMAIExporter *instance, FMAIExporter
parms->basename = NULL;
code = FMA_IEXPORTER_CODE_OK;
- if( !parms->exported || !NA_IS_OBJECT_ITEM( parms->exported )){
+ if( !parms->exported || !FMA_IS_OBJECT_ITEM( parms->exported )){
code = FMA_IEXPORTER_CODE_INVALID_ITEM;
}
@@ -445,7 +445,7 @@ nadp_writer_iexporter_export_to_file( const FMAIExporter *instance, FMAIExporter
code = FMA_IEXPORTER_CODE_INVALID_FORMAT;
} else {
- id = na_object_get_id( parms->exported );
+ id = fma_object_get_id( parms->exported );
parms->basename = g_strdup_printf( "%s%s", id, NADP_DESKTOP_FILE_SUFFIX );
g_free( id );
@@ -476,21 +476,21 @@ guint
nadp_writer_ifactory_provider_write_start( const FMAIFactoryProvider *provider, void *writer_data,
const FMAIFactoryObject *object, GSList **messages )
{
- if( NA_IS_OBJECT_ITEM( object )){
- write_start_write_type( NADP_DESKTOP_FILE( writer_data ), NA_OBJECT_ITEM( object ));
+ if( FMA_IS_OBJECT_ITEM( object )){
+ write_start_write_type( NADP_DESKTOP_FILE( writer_data ), FMA_OBJECT_ITEM( object ));
}
return( FMA_IIO_PROVIDER_CODE_OK );
}
static void
-write_start_write_type( NadpDesktopFile *ndp, NAObjectItem *item )
+write_start_write_type( NadpDesktopFile *ndp, FMAObjectItem *item )
{
nadp_desktop_file_set_string(
ndp,
NADP_GROUP_DESKTOP,
NADP_KEY_TYPE,
- NA_IS_OBJECT_ACTION( item ) ? NADP_VALUE_TYPE_ACTION : NADP_VALUE_TYPE_MENU );
+ FMA_IS_OBJECT_ACTION( item ) ? NADP_VALUE_TYPE_ACTION : NADP_VALUE_TYPE_MENU );
}
/*
@@ -523,8 +523,8 @@ nadp_writer_ifactory_provider_write_data(
if( def->desktop_entry && strlen( def->desktop_entry )){
- if( NA_IS_OBJECT_PROFILE( object )){
- profile_id = na_object_get_id( object );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ profile_id = fma_object_get_id( object );
group_name = g_strdup_printf( "%s %s", NADP_GROUP_PROFILE, profile_id );
g_free( profile_id );
@@ -540,7 +540,7 @@ nadp_writer_ifactory_provider_write_data(
str_value = fma_boxed_get_string( FMA_BOXED( boxed ));
if( !strcmp( def->name, FMAFO_DATA_PATH )){
- parms = na_object_get_parameters( object );
+ parms = fma_object_get_parameters( object );
tmp = g_strdup_printf( "%s %s", str_value, parms );
g_free( str_value );
g_free( parms );
@@ -592,22 +592,22 @@ guint
nadp_writer_ifactory_provider_write_done( const FMAIFactoryProvider *provider, void *writer_data,
const FMAIFactoryObject *object, GSList **messages )
{
- if( NA_IS_OBJECT_ITEM( object )){
- write_done_write_subitems_list( NADP_DESKTOP_FILE( writer_data ), NA_OBJECT_ITEM( object ));
+ if( FMA_IS_OBJECT_ITEM( object )){
+ write_done_write_subitems_list( NADP_DESKTOP_FILE( writer_data ), FMA_OBJECT_ITEM( object ));
}
return( FMA_IIO_PROVIDER_CODE_OK );
}
static void
-write_done_write_subitems_list( NadpDesktopFile *ndp, NAObjectItem *item )
+write_done_write_subitems_list( NadpDesktopFile *ndp, FMAObjectItem *item )
{
static const gchar *thisfn = "nadp_writer_write_done_write_subitems_list";
GSList *subitems;
GSList *profile_groups, *ip;
gchar *tmp;
- subitems = na_object_get_items_slist( item );
+ subitems = fma_object_get_items_slist( item );
tmp = g_strdup_printf( "%s (written subitems)", thisfn );
fma_core_utils_slist_dump( tmp, subitems );
g_free( tmp );
@@ -615,7 +615,7 @@ write_done_write_subitems_list( NadpDesktopFile *ndp, NAObjectItem *item )
nadp_desktop_file_set_string_list(
ndp,
NADP_GROUP_DESKTOP,
- NA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
+ FMA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
subitems );
profile_groups = nadp_desktop_file_get_profiles( ndp );
diff --git a/src/io-desktop/nadp-writer.h b/src/io-desktop/nadp-writer.h
index c553336..f1ac391 100644
--- a/src/io-desktop/nadp-writer.h
+++ b/src/io-desktop/nadp-writer.h
@@ -39,9 +39,9 @@ G_BEGIN_DECLS
gboolean nadp_iio_provider_is_willing_to_write ( const FMAIIOProvider *provider );
gboolean nadp_iio_provider_is_able_to_write ( const FMAIIOProvider *provider );
-guint nadp_iio_provider_write_item ( const FMAIIOProvider *provider, const NAObjectItem *item,
GSList **messages );
-guint nadp_iio_provider_delete_item ( const FMAIIOProvider *provider, const NAObjectItem *item,
GSList **messages );
-guint nadp_iio_provider_duplicate_data ( const FMAIIOProvider *provider, NAObjectItem *dest, const
NAObjectItem *source, GSList **messages );
+guint nadp_iio_provider_write_item ( const FMAIIOProvider *provider, const FMAObjectItem *item,
GSList **messages );
+guint nadp_iio_provider_delete_item ( const FMAIIOProvider *provider, const FMAObjectItem *item,
GSList **messages );
+guint nadp_iio_provider_duplicate_data ( const FMAIIOProvider *provider, FMAObjectItem *dest, const
FMAObjectItem *source, GSList **messages );
guint nadp_writer_iexporter_export_to_buffer( const FMAIExporter *instance, FMAIExporterBufferParmsv2
*parms );
guint nadp_writer_iexporter_export_to_file ( const FMAIExporter *instance, FMAIExporterFileParmsv2
*parms );
diff --git a/src/io-gconf/nagp-reader.c b/src/io-gconf/nagp-reader.c
index b602e5a..c5d72b4 100644
--- a/src/io-gconf/nagp-reader.c
+++ b/src/io-gconf/nagp-reader.c
@@ -37,7 +37,7 @@
#include <api/fma-data-types.h>
#include <api/fma-ifactory-provider.h>
#include <api/fma-iio-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-core-utils.h>
#include <api/fma-gconf-utils.h>
@@ -48,16 +48,16 @@
typedef struct {
gchar *path;
GSList *entries;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
}
ReaderData;
-static NAObjectItem *read_item( NagpGConfProvider *provider, const gchar *path, GSList **messages );
+static FMAObjectItem *read_item( NagpGConfProvider *provider, const gchar *path, GSList **messages );
-static void read_start_profile_attach_profile( const FMAIFactoryProvider *provider, NAObjectProfile
*profile, ReaderData *data, GSList **messages );
+static void read_start_profile_attach_profile( const FMAIFactoryProvider *provider,
FMAObjectProfile *profile, ReaderData *data, GSList **messages );
-static gboolean read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem *item,
ReaderData *data, GSList **messages );
-static void read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAction
*action, ReaderData *data, GSList **messages );
+static gboolean read_done_item_is_writable( const FMAIFactoryProvider *provider, FMAObjectItem *item,
ReaderData *data, GSList **messages );
+static void read_done_action_read_profiles( const FMAIFactoryProvider *provider, FMAObjectAction
*action, ReaderData *data, GSList **messages );
static void read_done_action_load_profile( const FMAIFactoryProvider *provider, ReaderData *data,
const gchar *path, GSList **messages );
static FMADataBoxed *get_boxed_from_path( const NagpGConfProvider *provider, const gchar *path, ReaderData
*reader_data, const FMADataDef *def );
@@ -67,7 +67,7 @@ static gboolean is_key_writable( NagpGConfProvider *gconf, const gchar *key
* nagp_iio_provider_read_items:
*
* Note that whatever be the version of the read action, it will be
- * stored as a #NAObjectAction and its set of #NAObjectProfile of the same,
+ * stored as a #FMAObjectAction and its set of #FMAObjectProfile of the same,
* latest, version of these classes.
*/
GList *
@@ -77,7 +77,7 @@ nagp_iio_provider_read_items( const FMAIIOProvider *provider, GSList **messages
NagpGConfProvider *self;
GList *items_list = NULL;
GSList *listpath, *ip;
- NAObjectItem *item;
+ FMAObjectItem *item;
g_debug( "%s: provider=%p, messages=%p", thisfn, ( void * ) provider, ( void * ) messages );
@@ -94,7 +94,7 @@ nagp_iio_provider_read_items( const FMAIIOProvider *provider, GSList **messages
item = read_item( self, ( const gchar * ) ip->data, messages );
if( item ){
items_list = g_list_prepend( items_list, item );
- na_object_dump( item );
+ fma_object_dump( item );
}
}
@@ -108,11 +108,11 @@ nagp_iio_provider_read_items( const FMAIIOProvider *provider, GSList **messages
/*
* path is here the full path to an item
*/
-static NAObjectItem *
+static FMAObjectItem *
read_item( NagpGConfProvider *provider, const gchar *path, GSList **messages )
{
static const gchar *thisfn = "nagp_reader_read_item";
- NAObjectItem *item;
+ FMAObjectItem *item;
gchar *full_path;
gchar *type;
gchar *id;
@@ -131,10 +131,10 @@ read_item( NagpGConfProvider *provider, const gchar *path, GSList **messages )
/* an item may have 'Action' or 'Menu' type; defaults to Action
*/
if( !type || !strlen( type ) || !strcmp( type, NAGP_VALUE_TYPE_ACTION )){
- item = NA_OBJECT_ITEM( na_object_action_new());
+ item = FMA_OBJECT_ITEM( fma_object_action_new());
} else if( !strcmp( type, NAGP_VALUE_TYPE_MENU )){
- item = NA_OBJECT_ITEM( na_object_menu_new());
+ item = FMA_OBJECT_ITEM( fma_object_menu_new());
} else {
g_warning( "%s: unknown type '%s' at %s", thisfn, type, path );
@@ -144,7 +144,7 @@ read_item( NagpGConfProvider *provider, const gchar *path, GSList **messages )
if( item ){
id = g_path_get_basename( path );
- na_object_set_id( item, id );
+ fma_object_set_id( item, id );
g_free( id );
data = g_new0( ReaderData, 1 );
@@ -183,16 +183,16 @@ nagp_reader_read_start( const FMAIFactoryProvider *provider, void *reader_data,
( void * ) object, G_OBJECT_TYPE_NAME( object ),
( void * ) messages );
- if( NA_IS_OBJECT_PROFILE( object )){
- read_start_profile_attach_profile( provider, NA_OBJECT_PROFILE( object ), (
ReaderData * ) reader_data, messages );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ read_start_profile_attach_profile( provider, FMA_OBJECT_PROFILE( object ), (
ReaderData * ) reader_data, messages );
}
}
}
static void
-read_start_profile_attach_profile( const FMAIFactoryProvider *provider, NAObjectProfile *profile, ReaderData
*data, GSList **messages )
+read_start_profile_attach_profile( const FMAIFactoryProvider *provider, FMAObjectProfile *profile,
ReaderData *data, GSList **messages )
{
- na_object_attach_profile( data->parent, profile );
+ fma_object_attach_profile( data->parent, profile );
}
FMADataBoxed *
@@ -240,13 +240,13 @@ nagp_reader_read_done( const FMAIFactoryProvider *provider, void *reader_data, c
( void * ) object, G_OBJECT_TYPE_NAME( object ),
( void * ) messages );
- if( NA_IS_OBJECT_ITEM( object )){
- writable = read_done_item_is_writable( provider, NA_OBJECT_ITEM( object ), (
ReaderData * ) reader_data, messages );
- na_object_set_readonly( object, !writable );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ writable = read_done_item_is_writable( provider, FMA_OBJECT_ITEM( object ), (
ReaderData * ) reader_data, messages );
+ fma_object_set_readonly( object, !writable );
}
- if( NA_IS_OBJECT_ACTION( object )){
- read_done_action_read_profiles( provider, NA_OBJECT_ACTION( object ), ( ReaderData *
) reader_data, messages );
+ if( FMA_IS_OBJECT_ACTION( object )){
+ read_done_action_read_profiles( provider, FMA_OBJECT_ACTION( object ), ( ReaderData *
) reader_data, messages );
}
g_debug( "%s: quitting for %s at %p", thisfn, G_OBJECT_TYPE_NAME( object ), ( void * ) object
);
@@ -254,7 +254,7 @@ nagp_reader_read_done( const FMAIFactoryProvider *provider, void *reader_data, c
}
static gboolean
-read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem *item, ReaderData *data,
GSList **messages )
+read_done_item_is_writable( const FMAIFactoryProvider *provider, FMAObjectItem *item, ReaderData *data,
GSList **messages )
{
GSList *ie;
gboolean writable;
@@ -276,7 +276,7 @@ read_done_item_is_writable( const FMAIFactoryProvider *provider, NAObjectItem *i
}
static void
-read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAction *action, ReaderData
*data, GSList **messages )
+read_done_action_read_profiles( const FMAIFactoryProvider *provider, FMAObjectAction *action, ReaderData
*data, GSList **messages )
{
static const gchar *thisfn = "nagp_reader_read_done_action_read_profiles";
GSList *order;
@@ -284,11 +284,11 @@ read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAct
GSList *ip;
gchar *profile_id;
gchar *profile_path;
- NAObjectId *found;
- NAObjectProfile *profile;
+ FMAObjectId *found;
+ FMAObjectProfile *profile;
- data->parent = NA_OBJECT_ITEM( action );
- order = na_object_get_items_slist( action );
+ data->parent = FMA_OBJECT_ITEM( action );
+ order = fma_object_get_items_slist( action );
list_profiles = fma_gconf_utils_get_subdirs( NAGP_GCONF_PROVIDER( provider )->private->gconf,
data->path );
/* read profiles in the specified order
@@ -297,7 +297,7 @@ read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAct
*/
for( ip = order ; ip ; ip = ip->next ){
profile_id = ( gchar * ) ip->data;
- found = na_object_get_item( action, profile_id );
+ found = fma_object_get_item( action, profile_id );
if( !found ){
g_debug( "nagp_reader_read_done_action: loading profile=%s", profile_id );
profile_path = gconf_concat_dir_and_key( data->path, profile_id );
@@ -311,7 +311,7 @@ read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAct
*/
for( ip = list_profiles ; ip ; ip = ip->next ){
profile_id = g_path_get_basename(( const gchar * ) ip->data );
- found = na_object_get_item( action, profile_id );
+ found = fma_object_get_item( action, profile_id );
if( !found ){
g_debug( "nagp_reader_read_done_action: loading profile=%s", profile_id );
read_done_action_load_profile( provider, data, ( const gchar * ) ip->data, messages );
@@ -321,10 +321,10 @@ read_done_action_read_profiles( const FMAIFactoryProvider *provider, NAObjectAct
/* make sure we have at least one profile
*/
- if( !na_object_get_items_count( action )){
+ if( !fma_object_get_items_count( action )){
g_warning( "%s: no profile found in GConf backend", thisfn );
- profile = na_object_profile_new_with_defaults();
- na_object_attach_profile( action, profile );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_attach_profile( action, profile );
}
}
@@ -334,10 +334,10 @@ read_done_action_load_profile( const FMAIFactoryProvider *provider, ReaderData *
gchar *id;
ReaderData *profile_data;
- NAObjectProfile *profile = na_object_profile_new();
+ FMAObjectProfile *profile = fma_object_profile_new();
id = g_path_get_basename( path );
- na_object_set_id( profile, id );
+ fma_object_set_id( profile, id );
g_free( id );
profile_data = g_new0( ReaderData, 1 );
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 8bbb55c..befc3c7 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -37,7 +37,7 @@
#include <api/fma-data-types.h>
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-core-utils.h>
#include <api/fma-gconf-utils.h>
@@ -46,8 +46,8 @@
#include "nagp-keys.h"
#ifdef NA_ENABLE_DEPRECATED
-static void write_start_write_type( NagpGConfProvider *provider, NAObjectItem *item );
-static void write_start_write_version( NagpGConfProvider *provider, NAObjectItem *item );
+static void write_start_write_type( NagpGConfProvider *provider, FMAObjectItem *item );
+static void write_start_write_version( NagpGConfProvider *provider, FMAObjectItem *item );
#endif
/*
@@ -126,7 +126,7 @@ nagp_iio_provider_is_able_to_write( const FMAIIOProvider *provider )
* before trying to write the new ones
*/
guint
-nagp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem *item, GSList **messages )
+nagp_iio_provider_write_item( const FMAIIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "nagp_gconf_provider_iio_provider_write_item";
NagpGConfProvider *self;
@@ -142,7 +142,7 @@ nagp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
g_return_val_if_fail( NAGP_IS_GCONF_PROVIDER( provider ), ret );
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
self = NAGP_GCONF_PROVIDER( provider );
@@ -166,7 +166,7 @@ nagp_iio_provider_write_item( const FMAIIOProvider *provider, const NAObjectItem
* cf. http://bugzilla.gnome.org/show_bug.cgi?id=325585
*/
guint
-nagp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectItem *item, GSList **messages )
+nagp_iio_provider_delete_item( const FMAIIOProvider *provider, const FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "nagp_gconf_provider_iio_provider_delete_item";
NagpGConfProvider *self;
@@ -184,7 +184,7 @@ nagp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectIte
g_return_val_if_fail( FMA_IS_IIO_PROVIDER( provider ), ret );
g_return_val_if_fail( NAGP_IS_GCONF_PROVIDER( provider ), ret );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), ret );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), ret );
self = NAGP_GCONF_PROVIDER( provider );
@@ -193,7 +193,7 @@ nagp_iio_provider_delete_item( const FMAIIOProvider *provider, const NAObjectIte
}
ret = FMA_IIO_PROVIDER_CODE_OK;
- uuid = na_object_get_id( NA_OBJECT( item ));
+ uuid = fma_object_get_id( FMA_OBJECT( item ));
/* GCONF_UNSET_INCLUDING_SCHEMA_NAMES seems mean: including the name
* of the schemas which is embedded in the GConfEntry - this doesn't
@@ -236,26 +236,26 @@ guint
nagp_writer_write_start( const FMAIFactoryProvider *writer, void *writer_data,
const FMAIFactoryObject *object, GSList **messages )
{
- if( NA_IS_OBJECT_ITEM( object )){
- write_start_write_type( NAGP_GCONF_PROVIDER( writer ), NA_OBJECT_ITEM( object ));
- write_start_write_version( NAGP_GCONF_PROVIDER( writer ), NA_OBJECT_ITEM( object ));
+ if( FMA_IS_OBJECT_ITEM( object )){
+ write_start_write_type( NAGP_GCONF_PROVIDER( writer ), FMA_OBJECT_ITEM( object ));
+ write_start_write_version( NAGP_GCONF_PROVIDER( writer ), FMA_OBJECT_ITEM( object ));
}
return( FMA_IIO_PROVIDER_CODE_OK );
}
static void
-write_start_write_type( NagpGConfProvider *provider, NAObjectItem *item )
+write_start_write_type( NagpGConfProvider *provider, FMAObjectItem *item )
{
gchar *id, *path;
- id = na_object_get_id( item );
+ id = fma_object_get_id( item );
path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_TYPE );
fma_gconf_utils_write_string(
provider->private->gconf,
path,
- NA_IS_OBJECT_ACTION( item ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU,
+ FMA_IS_OBJECT_ACTION( item ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU,
NULL );
g_free( path );
@@ -263,15 +263,15 @@ write_start_write_type( NagpGConfProvider *provider, NAObjectItem *item )
}
static void
-write_start_write_version( NagpGConfProvider *provider, NAObjectItem *item )
+write_start_write_version( NagpGConfProvider *provider, FMAObjectItem *item )
{
gchar *id, *path;
guint iversion;
- id = na_object_get_id( item );
+ id = fma_object_get_id( item );
path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_IVERSION );
- iversion = na_object_get_iversion( item );
+ iversion = fma_object_get_iversion( item );
fma_gconf_utils_write_int( provider->private->gconf, path, iversion, NULL );
g_free( path );
@@ -303,16 +303,16 @@ nagp_writer_write_data( const FMAIFactoryProvider *provider, void *writer_data,
if( !fma_data_boxed_is_default( boxed ) || def->write_if_default ){
- if( NA_IS_OBJECT_PROFILE( object )){
- NAObjectItem *parent = NA_OBJECT_ITEM( na_object_get_parent( object ));
- gchar *parent_id = na_object_get_id( parent );
- gchar *id = na_object_get_id( object );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ FMAObjectItem *parent = FMA_OBJECT_ITEM( fma_object_get_parent( object ));
+ gchar *parent_id = fma_object_get_id( parent );
+ gchar *id = fma_object_get_id( object );
this_id = g_strdup_printf( "%s/%s", parent_id, id );
g_free( id );
g_free( parent_id );
} else {
- this_id = na_object_get_id( object );
+ this_id = fma_object_get_id( object );
}
this_path = gconf_concat_dir_and_key( NAGP_CONFIGURATIONS_PATH, this_id );
diff --git a/src/io-gconf/nagp-writer.h b/src/io-gconf/nagp-writer.h
index 7690b89..a4b2c5b 100644
--- a/src/io-gconf/nagp-writer.h
+++ b/src/io-gconf/nagp-writer.h
@@ -46,10 +46,10 @@ gboolean nagp_iio_provider_is_able_to_write ( const FMAIIOProvider *provider )
*/
#ifdef NA_ENABLE_DEPRECATED
guint nagp_iio_provider_write_item ( const FMAIIOProvider *provider,
- const
NAObjectItem *item, GSList **message );
+ const
FMAObjectItem *item, GSList **message );
guint nagp_iio_provider_delete_item ( const FMAIIOProvider *provider,
- const
NAObjectItem *item, GSList **message );
+ const
FMAObjectItem *item, GSList **message );
/* FMAIFactoryProvider interface
*/
diff --git a/src/io-xml/naxml-reader.c b/src/io-xml/naxml-reader.c
index 05a7af4..bd64b44 100644
--- a/src/io-xml/naxml-reader.c
+++ b/src/io-xml/naxml-reader.c
@@ -39,7 +39,7 @@
#include <api/fma-gconf-utils.h>
#include <api/fma-data-types.h>
#include <api/fma-ifactory-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <io-gconf/nagp-keys.h>
@@ -153,14 +153,14 @@ static RootNodeStr st_root_node_str[] = {
#define ERR_NODE_UNKNOWN_TYPE _( "Unknown type %s found at line %d, while waiting for Action or
Menu." )
#define ERR_NOT_IOXML _( "The XML I/O Provider is not able to handle the URI" )
-static void read_start_profile_attach_profile( NAXMLReader *reader, NAObjectProfile *profile );
+static void read_start_profile_attach_profile( NAXMLReader *reader, FMAObjectProfile *profile );
static gboolean read_data_is_path_adhoc_for_object( NAXMLReader *reader, const FMAIFactoryObject
*object, xmlChar *text );
static FMADataBoxed *read_data_boxed_from_node( NAXMLReader *reader, xmlChar *text, xmlNode *parent, const
FMADataDef *def );
-static void read_done_item_set_localized_icon( NAXMLReader *reader, NAObjectItem *item );
-static void read_done_action_read_profiles( NAXMLReader *reader, NAObjectAction *action );
+static void read_done_item_set_localized_icon( NAXMLReader *reader, FMAObjectItem *item );
+static void read_done_action_read_profiles( NAXMLReader *reader, FMAObjectAction *action );
static gchar *read_done_action_get_next_profile_id( NAXMLReader *reader );
static void read_done_action_load_profile( NAXMLReader *reader, const gchar *profile_id );
-static void read_done_profile_set_localized_label( NAXMLReader *reader, NAObjectProfile *profile );
+static void read_done_profile_set_localized_label( NAXMLReader *reader, FMAObjectProfile *profile );
static guint reader_parse_xmldoc( NAXMLReader *reader );
static guint iter_on_root_children( NAXMLReader *reader, xmlNode *root );
@@ -351,7 +351,7 @@ naxml_reader_import_from_uri( const FMAIImporter *instance, void *parms_ptr )
g_object_unref( reader );
if( code == IMPORTER_CODE_OK ){
- na_object_dump( parms->imported );
+ fma_object_dump( parms->imported );
} else if( parms->imported ){
g_object_unref( parms->imported );
@@ -575,7 +575,7 @@ iter_on_list_children( NAXMLReader *reader, xmlNode *list )
if( code == IMPORTER_CODE_OK ){
if( !reader->private->type_found ){
- reader->private->parms->imported = NA_OBJECT_ITEM( na_object_action_new());
+ reader->private->parms->imported = FMA_OBJECT_ITEM( fma_object_action_new());
}
}
@@ -583,7 +583,7 @@ iter_on_list_children( NAXMLReader *reader, xmlNode *list )
*/
if( code == IMPORTER_CODE_OK ){
- na_object_set_id( reader->private->parms->imported, reader->private->item_id );
+ fma_object_set_id( reader->private->parms->imported, reader->private->item_id );
fma_ifactory_provider_read_item(
FMA_IFACTORY_PROVIDER( reader->private->importer ),
@@ -610,15 +610,15 @@ naxml_reader_read_start( const FMAIFactoryProvider *provider, void *reader_data,
( void * ) object, G_OBJECT_TYPE_NAME( object ),
( void * ) messages );
- if( NA_IS_OBJECT_PROFILE( object )){
- read_start_profile_attach_profile( NAXML_READER( reader_data ), NA_OBJECT_PROFILE( object ));
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ read_start_profile_attach_profile( NAXML_READER( reader_data ), FMA_OBJECT_PROFILE( object ));
}
}
static void
-read_start_profile_attach_profile( NAXMLReader *reader, NAObjectProfile *profile )
+read_start_profile_attach_profile( NAXMLReader *reader, FMAObjectProfile *profile )
{
- na_object_attach_profile( reader->private->parms->imported, profile );
+ fma_object_attach_profile( reader->private->parms->imported, profile );
}
/*
@@ -692,7 +692,7 @@ read_data_is_path_adhoc_for_object( NAXMLReader *reader, const FMAIFactoryObject
path_slist = fma_core_utils_slist_from_split(( const gchar * ) text, "/" );
path_length = g_slist_length( path_slist );
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
if( path_length != reader->private->root_node_str->key_length ){
adhoc = FALSE;
}
@@ -706,7 +706,7 @@ read_data_is_path_adhoc_for_object( NAXMLReader *reader, const FMAIFactoryObject
node_profile_id = g_path_get_basename( key_dirname );
g_free( key_dirname );
- factory_profile_id = na_object_get_id( object );
+ factory_profile_id = fma_object_get_id( object );
if( strcmp( node_profile_id, factory_profile_id ) != 0 ){
adhoc = FALSE;
@@ -771,40 +771,40 @@ naxml_reader_read_done( const FMAIFactoryProvider *provider, void *reader_data,
( void * ) object, G_OBJECT_TYPE_NAME( object ),
( void * ) messages );
- if( NA_IS_OBJECT_ITEM( object )){
- read_done_item_set_localized_icon( NAXML_READER( reader_data ), NA_OBJECT_ITEM( object ));
+ if( FMA_IS_OBJECT_ITEM( object )){
+ read_done_item_set_localized_icon( NAXML_READER( reader_data ), FMA_OBJECT_ITEM( object ));
}
- if( NA_IS_OBJECT_ACTION( object )){
- read_done_action_read_profiles( NAXML_READER( reader_data ), NA_OBJECT_ACTION( object ));
+ if( FMA_IS_OBJECT_ACTION( object )){
+ read_done_action_read_profiles( NAXML_READER( reader_data ), FMA_OBJECT_ACTION( object ));
}
- if( NA_IS_OBJECT_PROFILE( object )){
- read_done_profile_set_localized_label( NAXML_READER( reader_data ), NA_OBJECT_PROFILE( object
));
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ read_done_profile_set_localized_label( NAXML_READER( reader_data ), FMA_OBJECT_PROFILE(
object ));
}
g_debug( "%s: quitting for %s at %p", thisfn, G_OBJECT_TYPE_NAME( object ), ( void * ) object );
}
/*
- * just having read this NAObjectItem
+ * just having read this FMAObjectItem
* so deals with unlocalized/localized icon name/path
*/
static void
-read_done_item_set_localized_icon( NAXMLReader *reader, NAObjectItem *item )
+read_done_item_set_localized_icon( NAXMLReader *reader, FMAObjectItem *item )
{
gchar *icon, *unloc_icon;
/* deals with localized/unlocalized icon name
* it used to be unlocalized up to 2.29.4 included
*/
- icon = na_object_get_icon( item );
+ icon = fma_object_get_icon( item );
if( !icon || !strlen( icon )){
- unloc_icon = na_object_get_icon_noloc( item );
+ unloc_icon = fma_object_get_icon_noloc( item );
if( unloc_icon && strlen( unloc_icon )){
- na_object_set_icon( item, unloc_icon );
+ fma_object_set_icon( item, unloc_icon );
}
g_free( unloc_icon );
@@ -821,18 +821,18 @@ read_done_item_set_localized_icon( NAXMLReader *reader, NAObjectItem *item )
* Also note that profiles order has been introduced in 2.29 serie
*/
static void
-read_done_action_read_profiles( NAXMLReader *reader, NAObjectAction *action )
+read_done_action_read_profiles( NAXMLReader *reader, FMAObjectAction *action )
{
static const gchar *thisfn = "naxml_reader_read_done_action_read_profiles";
GSList *order, *ip;
gchar *profile_id;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
- if( !na_object_get_items_count( reader->private->parms->imported )){
+ if( !fma_object_get_items_count( reader->private->parms->imported )){
/* first attach potential ordered profiles
*/
- order = na_object_get_items_slist( reader->private->parms->imported );
+ order = fma_object_get_items_slist( reader->private->parms->imported );
for( ip = order ; ip ; ip = ip->next ){
read_done_action_load_profile( reader, ( const gchar * ) ip->data );
}
@@ -854,10 +854,10 @@ read_done_action_read_profiles( NAXMLReader *reader, NAObjectAction *action )
/* make sure we have at least one profile attached to the action
*/
- if( !na_object_get_items_count( action )){
+ if( !fma_object_get_items_count( action )){
g_warning( "%s: no profile found in .xml file", thisfn );
- profile = na_object_profile_new_with_defaults();
- na_object_attach_profile( action, profile );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_attach_profile( action, profile );
}
}
@@ -888,7 +888,7 @@ read_done_action_get_next_profile_id( NAXMLReader *reader )
profile_id = g_path_get_basename( name );
g_free( name );
- if( na_object_get_item( reader->private->parms->imported, profile_id )){
+ if( fma_object_get_item( reader->private->parms->imported, profile_id )){
g_free( profile_id );
profile_id = NULL;
}
@@ -905,9 +905,9 @@ read_done_action_load_profile( NAXMLReader *reader, const gchar *profile_id )
{
/*g_debug( "naxml_reader_read_done_action_load_profile: profile_id=%s", profile_id );*/
- NAObjectProfile *profile = na_object_profile_new_with_defaults();
+ FMAObjectProfile *profile = fma_object_profile_new_with_defaults();
- na_object_set_id( profile, profile_id );
+ fma_object_set_id( profile, profile_id );
fma_ifactory_provider_read_item(
FMA_IFACTORY_PROVIDER( reader->private->importer ),
@@ -917,24 +917,24 @@ read_done_action_load_profile( NAXMLReader *reader, const gchar *profile_id )
}
/*
- * just having read this NAObjectProfile
+ * just having read this FMAObjectProfile
* so deals with unlocalized/localized desc-name
*/
static void
-read_done_profile_set_localized_label( NAXMLReader *reader, NAObjectProfile *profile )
+read_done_profile_set_localized_label( NAXMLReader *reader, FMAObjectProfile *profile )
{
gchar *descname, *unloc_descname;
/* deals with localized/unlocalized descname name
* it used to be unlocalized up to 2.29.4 included
*/
- descname = na_object_get_label( profile );
+ descname = fma_object_get_label( profile );
if( !descname || !strlen( descname )){
- unloc_descname = na_object_get_label_noloc( profile );
+ unloc_descname = fma_object_get_label_noloc( profile );
if( unloc_descname && strlen( unloc_descname )){
- na_object_set_label( profile, unloc_descname );
+ fma_object_set_label( profile, unloc_descname );
}
g_free( unloc_descname );
@@ -1066,10 +1066,10 @@ schema_check_for_type( NAXMLReader *reader, xmlNode *iter )
gchar *type = get_value_from_child_node( iter->parent, NAXML_KEY_SCHEMA_NODE_DEFAULT );
if( !strcmp( type, NAGP_VALUE_TYPE_ACTION )){
- reader->private->parms->imported = NA_OBJECT_ITEM( na_object_action_new());
+ reader->private->parms->imported = FMA_OBJECT_ITEM( fma_object_action_new());
} else if( !strcmp( type, NAGP_VALUE_TYPE_MENU )){
- reader->private->parms->imported = NA_OBJECT_ITEM( na_object_menu_new());
+ reader->private->parms->imported = FMA_OBJECT_ITEM( fma_object_menu_new());
} else {
fma_core_utils_slist_add_message( &reader->private->parms->messages,
ERR_NODE_UNKNOWN_TYPE, type, iter->line );
@@ -1191,10 +1191,10 @@ dump_check_for_type( NAXMLReader *reader, xmlNode *key_node )
gchar *type = get_value_from_child_child_node( key_node->parent, NAXML_KEY_DUMP_NODE_VALUE,
NAXML_KEY_DUMP_NODE_VALUE_TYPE_STRING );
if( !strcmp( type, NAGP_VALUE_TYPE_ACTION )){
- reader->private->parms->imported = NA_OBJECT_ITEM( na_object_action_new());
+ reader->private->parms->imported = FMA_OBJECT_ITEM( fma_object_action_new());
} else if( !strcmp( type, NAGP_VALUE_TYPE_MENU )){
- reader->private->parms->imported = NA_OBJECT_ITEM( na_object_menu_new());
+ reader->private->parms->imported = FMA_OBJECT_ITEM( fma_object_menu_new());
} else {
fma_core_utils_slist_add_message( &reader->private->parms->messages,
ERR_NODE_UNKNOWN_TYPE, type, key_node->line );
diff --git a/src/io-xml/naxml-reader.h b/src/io-xml/naxml-reader.h
index 2a949c8..40f3f2b 100644
--- a/src/io-xml/naxml-reader.h
+++ b/src/io-xml/naxml-reader.h
@@ -41,7 +41,7 @@
* then we returned IMPORTER_CODE_NOT_WILLING_TO.
* In all other cases, errors or inconsistancies are signaled, but
* we do our best to actually import the file and produce a valuable
- * #NAObjectItem-derived object.
+ * #FMAObjectItem-derived object.
*/
#include <api/fma-data-boxed.h>
diff --git a/src/io-xml/naxml-writer.c b/src/io-xml/naxml-writer.c
index eb02f56..7a38258 100644
--- a/src/io-xml/naxml-writer.c
+++ b/src/io-xml/naxml-writer.c
@@ -38,7 +38,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-data-types.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-ifactory-provider.h>
#include <api/fma-iio-provider.h>
@@ -61,7 +61,7 @@ struct _NAXMLWriterClassPrivate {
struct _NAXMLWriterPrivate {
gboolean dispose_has_run;
FMAIExporter *provider;
- NAObjectItem *exported;
+ FMAObjectItem *exported;
GSList *messages;
/* positionning these at document level
@@ -85,10 +85,10 @@ struct ExportFormatFn {
gchar *format;
gchar *root_node;
gchar *list_node;
- void ( *write_list_attribs_fn )( NAXMLWriter *, const NAObjectItem * );
+ void ( *write_list_attribs_fn )( NAXMLWriter *, const FMAObjectItem * );
gchar *element_node;
- void ( *write_data_fn )( NAXMLWriter *, const NAObjectId *, const FMADataBoxed *, const FMADataDef *
);
- void ( *write_type_fn )( NAXMLWriter *, const NAObjectItem *, const FMADataDef *, const gchar * );
+ void ( *write_data_fn )( NAXMLWriter *, const FMAObjectId *, const FMADataBoxed *, const FMADataDef *
);
+ void ( *write_type_fn )( NAXMLWriter *, const FMAObjectItem *, const FMADataDef *, const gchar * );
};
static GObjectClass *st_parent_class = NULL;
@@ -99,19 +99,19 @@ static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void write_start_write_type( NAXMLWriter *writer, NAObjectItem *object, const FMADataGroup
*groups );
-static void write_start_write_version( NAXMLWriter *writer, NAObjectItem *object, const
FMADataGroup *groups );
+static void write_start_write_type( NAXMLWriter *writer, FMAObjectItem *object, const
FMADataGroup *groups );
+static void write_start_write_version( NAXMLWriter *writer, FMAObjectItem *object, const
FMADataGroup *groups );
-static void write_data_schema_v1( NAXMLWriter *writer, const NAObjectId *object, const
FMADataBoxed *boxed, const FMADataDef *def );
+static void write_data_schema_v1( NAXMLWriter *writer, const FMAObjectId *object, const
FMADataBoxed *boxed, const FMADataDef *def );
static void write_data_schema_v1_element( NAXMLWriter *writer, const FMADataDef *def );
-static void write_type_schema_v1( NAXMLWriter *writer, const NAObjectItem *object, const
FMADataDef *def, const gchar *value );
-static void write_data_schema_v2( NAXMLWriter *writer, const NAObjectId *object, const
FMADataBoxed *boxed, const FMADataDef *def );
+static void write_type_schema_v1( NAXMLWriter *writer, const FMAObjectItem *object, const
FMADataDef *def, const gchar *value );
+static void write_data_schema_v2( NAXMLWriter *writer, const FMAObjectId *object, const
FMADataBoxed *boxed, const FMADataDef *def );
static void write_data_schema_v2_element( NAXMLWriter *writer, const FMADataDef *def, const gchar
*object_id, const gchar *value_str );
-static void write_type_schema_v2( NAXMLWriter *writer, const NAObjectItem *object, const
FMADataDef *def, const gchar *value );
-static void write_list_attribs_dump( NAXMLWriter *writer, const NAObjectItem *object );
-static void write_data_dump( NAXMLWriter *writer, const NAObjectId *object, const FMADataBoxed
*boxed, const FMADataDef *def );
+static void write_type_schema_v2( NAXMLWriter *writer, const FMAObjectItem *object, const
FMADataDef *def, const gchar *value );
+static void write_list_attribs_dump( NAXMLWriter *writer, const FMAObjectItem *object );
+static void write_data_dump( NAXMLWriter *writer, const FMAObjectId *object, const FMADataBoxed
*boxed, const FMADataDef *def );
static void write_data_dump_element( NAXMLWriter *writer, const FMADataDef *def, const
FMADataBoxed *boxed, const gchar *entry, const gchar *value_str );
-static void write_type_dump( NAXMLWriter *writer, const NAObjectItem *object, const FMADataDef
*def, const gchar *value );
+static void write_type_dump( NAXMLWriter *writer, const FMAObjectItem *object, const FMADataDef
*def, const gchar *value );
static xmlDocPtr build_xml_doc( NAXMLWriter *writer );
static gchar *convert_to_gconf_slist( const gchar *str );
@@ -121,7 +121,7 @@ static ExportFormatFn *find_export_format_fn( const gchar *format );
static ExportFormatFn *find_export_format_fn_from_quark( GQuark format );
#endif
-static gchar *get_output_fname( const NAObjectItem *item, const gchar *folder, const gchar *format
);
+static gchar *get_output_fname( const FMAObjectItem *item, const gchar *folder, const gchar *format
);
static void output_xml_to_file( const gchar *xml, const gchar *filename, GSList **msg );
static guint writer_to_buffer( NAXMLWriter *writer );
@@ -282,7 +282,7 @@ naxml_writer_export_to_buffer( const FMAIExporter *instance, FMAIExporterBufferP
code = FMA_IEXPORTER_CODE_OK;
- if( !parms->exported || !NA_IS_OBJECT_ITEM( parms->exported )){
+ if( !parms->exported || !FMA_IS_OBJECT_ITEM( parms->exported )){
code = FMA_IEXPORTER_CODE_INVALID_ITEM;
}
@@ -340,7 +340,7 @@ naxml_writer_export_to_file( const FMAIExporter *instance, FMAIExporterFileParms
code = FMA_IEXPORTER_CODE_OK;
- if( !parms->exported || !NA_IS_OBJECT_ITEM( parms->exported )){
+ if( !parms->exported || !FMA_IS_OBJECT_ITEM( parms->exported )){
code = FMA_IEXPORTER_CODE_INVALID_ITEM;
}
@@ -416,20 +416,20 @@ naxml_writer_write_start( const FMAIFactoryProvider *provider, void *writer_data
g_debug( "naxml_writer_write_start: object=%p (%s)", ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- if( NA_IS_OBJECT_ITEM( object )){
- na_object_dump( object );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ fma_object_dump( object );
writer = NAXML_WRITER( writer_data );
writer->private->list_node = xmlNewChild( writer->private->root_node, NULL, BAD_CAST(
writer->private->fn_str->list_node ), NULL );
if( writer->private->fn_str->write_list_attribs_fn ){
- ( *writer->private->fn_str->write_list_attribs_fn )( writer, NA_OBJECT_ITEM( object
));
+ ( *writer->private->fn_str->write_list_attribs_fn )( writer, FMA_OBJECT_ITEM( object
));
}
groups = fma_ifactory_object_get_data_groups( object );
- write_start_write_type( writer, NA_OBJECT_ITEM( object ), groups );
- write_start_write_version( writer, NA_OBJECT_ITEM( object ), groups );
+ write_start_write_type( writer, FMA_OBJECT_ITEM( object ), groups );
+ write_start_write_version( writer, FMA_OBJECT_ITEM( object ), groups );
}
return( FMA_IIO_PROVIDER_CODE_OK );
@@ -439,7 +439,7 @@ naxml_writer_write_start( const FMAIFactoryProvider *provider, void *writer_data
* explicitly write the 'Type' node
*/
static void
-write_start_write_type( NAXMLWriter *writer, NAObjectItem *object, const FMADataGroup *groups )
+write_start_write_type( NAXMLWriter *writer, FMAObjectItem *object, const FMADataGroup *groups )
{
const FMADataDef *def;
const gchar *svalue;
@@ -447,13 +447,13 @@ write_start_write_type( NAXMLWriter *writer, NAObjectItem *object, const FMAData
writer->private->schema_node = NULL;
writer->private->locale_node = NULL;
def = fma_data_def_get_data_def( groups, FMA_FACTORY_OBJECT_ITEM_GROUP, FMAFO_DATA_TYPE );
- svalue = NA_IS_OBJECT_ACTION( object ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU;
+ svalue = FMA_IS_OBJECT_ACTION( object ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU;
( *writer->private->fn_str->write_type_fn )( writer, object, def, svalue );
}
static void
-write_start_write_version( NAXMLWriter *writer, NAObjectItem *object, const FMADataGroup *groups )
+write_start_write_version( NAXMLWriter *writer, FMAObjectItem *object, const FMADataGroup *groups )
{
const FMADataDef *def;
guint iversion;
@@ -462,7 +462,7 @@ write_start_write_version( NAXMLWriter *writer, NAObjectItem *object, const FMAD
writer->private->schema_node = NULL;
writer->private->locale_node = NULL;
def = fma_data_def_get_data_def( groups, FMA_FACTORY_OBJECT_ITEM_GROUP, FMAFO_DATA_IVERSION );
- iversion = na_object_get_iversion( object );
+ iversion = fma_object_get_iversion( object );
svalue = g_strdup_printf( "%d", iversion );
( *writer->private->fn_str->write_type_fn )( writer, object, def, svalue );
@@ -490,7 +490,7 @@ naxml_writer_write_data( const FMAIFactoryProvider *provider, void *writer_data,
writer->private->schema_node = NULL;
writer->private->locale_node = NULL;
- ( *writer->private->fn_str->write_data_fn )( writer, NA_OBJECT_ID( object ), boxed, def );
+ ( *writer->private->fn_str->write_data_fn )( writer, FMA_OBJECT_ID( object ), boxed, def );
}
return( FMA_IIO_PROVIDER_CODE_OK );
@@ -503,7 +503,7 @@ naxml_writer_write_done( const FMAIFactoryProvider *provider, void *writer_data,
}
static void
-write_data_schema_v1( NAXMLWriter *writer, const NAObjectId *object, const FMADataBoxed *boxed, const
FMADataDef *def )
+write_data_schema_v1( NAXMLWriter *writer, const FMAObjectId *object, const FMADataBoxed *boxed, const
FMADataDef *def )
{
write_data_schema_v2( writer, object, boxed, def );
@@ -524,11 +524,11 @@ write_data_schema_v1_element( NAXMLWriter *writer, const FMADataDef *def )
}
static void
-write_type_schema_v1( NAXMLWriter *writer, const NAObjectItem *object, const FMADataDef *def, const gchar
*value )
+write_type_schema_v1( NAXMLWriter *writer, const FMAObjectItem *object, const FMADataDef *def, const gchar
*value )
{
gchar *object_id;
- object_id = na_object_get_id( object );
+ object_id = fma_object_get_id( object );
write_data_schema_v2_element( writer, def, object_id, value );
write_data_schema_v1_element( writer, def );
@@ -541,7 +541,7 @@ write_type_schema_v1( NAXMLWriter *writer, const NAObjectItem *object, const FMA
* <applyto>/apps/file-manager-actions/configurations/item_id/profile_id/entry</applyto>
*/
static void
-write_data_schema_v2( NAXMLWriter *writer, const NAObjectId *object, const FMADataBoxed *boxed, const
FMADataDef *def )
+write_data_schema_v2( NAXMLWriter *writer, const FMAObjectId *object, const FMADataBoxed *boxed, const
FMADataDef *def )
{
gchar *object_id;
gchar *value_str;
@@ -566,11 +566,11 @@ write_data_schema_v2( NAXMLWriter *writer, const NAObjectId *object, const FMADa
value_str = tmp;
}
- object_id = na_object_get_id( object );
+ object_id = fma_object_get_id( object );
- if( NA_IS_OBJECT_PROFILE( object )){
- NAObjectItem *action = na_object_get_parent( object );
- gchar *id = na_object_get_id( action );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ FMAObjectItem *action = fma_object_get_parent( object );
+ gchar *id = fma_object_get_id( action );
gchar *tmp = g_strdup_printf( "%s/%s", id, object_id );
g_free( id );
g_free( object_id );
@@ -628,23 +628,23 @@ write_data_schema_v2_element( NAXMLWriter *writer, const FMADataDef *def, const
* <applyto>/apps/file-manager-actions/configurations/item_id/profile_id/entry</applyto>
*/
static void
-write_type_schema_v2( NAXMLWriter *writer, const NAObjectItem *object, const FMADataDef *def, const gchar
*value )
+write_type_schema_v2( NAXMLWriter *writer, const FMAObjectItem *object, const FMADataDef *def, const gchar
*value )
{
gchar *object_id;
- object_id = na_object_get_id( object );
+ object_id = fma_object_get_id( object );
write_data_schema_v2_element( writer, def, object_id, value );
g_free( object_id );
}
static void
-write_list_attribs_dump( NAXMLWriter *writer, const NAObjectItem *object )
+write_list_attribs_dump( NAXMLWriter *writer, const FMAObjectItem *object )
{
gchar *id;
gchar *path;
- id = na_object_get_id( object );
+ id = fma_object_get_id( object );
path = g_build_path( "/", NAGP_CONFIGURATIONS_PATH, id, NULL );
xmlNewProp( writer->private->list_node, BAD_CAST( NAXML_KEY_DUMP_LIST_PARM_BASE ), BAD_CAST( path ));
@@ -653,7 +653,7 @@ write_list_attribs_dump( NAXMLWriter *writer, const NAObjectItem *object )
}
static void
-write_data_dump( NAXMLWriter *writer, const NAObjectId *object, const FMADataBoxed *boxed, const FMADataDef
*def )
+write_data_dump( NAXMLWriter *writer, const FMAObjectId *object, const FMADataBoxed *boxed, const FMADataDef
*def )
{
gchar *entry;
gchar *value_str;
@@ -678,8 +678,8 @@ write_data_dump( NAXMLWriter *writer, const NAObjectId *object, const FMADataBox
value_str = tmp;
}
- if( NA_IS_OBJECT_PROFILE( object )){
- gchar *id = na_object_get_id( object );
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ gchar *id = fma_object_get_id( object );
entry = g_strdup_printf( "%s/%s", id, def->gconf_entry );
g_free( id );
} else {
@@ -729,7 +729,7 @@ write_data_dump_element( NAXMLWriter *writer, const FMADataDef *def, const FMADa
}
static void
-write_type_dump( NAXMLWriter *writer, const NAObjectItem *object, const FMADataDef *def, const gchar *value )
+write_type_dump( NAXMLWriter *writer, const FMAObjectItem *object, const FMADataDef *def, const gchar *value
)
{
write_data_dump_element( writer, def, NULL, def->gconf_entry, value );
}
@@ -804,7 +804,7 @@ find_export_format_fn_from_quark( GQuark format )
/*
* get_output_fname:
- * @item: the #NAObjectItme-derived object to be exported.
+ * @item: the #FMAObjectItme-derived object to be exported.
* @folder: the URI of the directoy where to write the output XML file.
* @format: the export format.
*
@@ -820,7 +820,7 @@ find_export_format_fn_from_quark( GQuark format )
* between our test of inexistance and the actual write.
*/
static gchar *
-get_output_fname( const NAObjectItem *item, const gchar *folder, const gchar *format )
+get_output_fname( const FMAObjectItem *item, const gchar *folder, const gchar *format )
{
static const gchar *thisfn = "naxml_writer_get_output_fname";
gchar *item_id;
@@ -829,11 +829,11 @@ get_output_fname( const NAObjectItem *item, const gchar *folder, const gchar *fo
gchar *candidate_fname;
gint counter;
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), NULL );
g_return_val_if_fail( folder, NULL );
g_return_val_if_fail( strlen( folder ), NULL );
- item_id = na_object_get_id( item );
+ item_id = fma_object_get_id( item );
if( !strcmp( format, NAXML_FORMAT_GCONF_SCHEMA_V1 )){
canonical_fname = g_strdup_printf( "config_%s", item_id );
@@ -844,7 +844,7 @@ get_output_fname( const NAObjectItem *item, const gchar *folder, const gchar *fo
canonical_ext = g_strdup( "schema" );
} else if( !strcmp( format, NAXML_FORMAT_GCONF_ENTRY )){
- canonical_fname = g_strdup_printf( "%s-%s", NA_IS_OBJECT_ACTION( item ) ? "action" : "menu",
item_id );
+ canonical_fname = g_strdup_printf( "%s-%s", FMA_IS_OBJECT_ACTION( item ) ? "action" : "menu",
item_id );
canonical_ext = g_strdup( "xml" );
} else {
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index b2d96df..2aa4c24 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -35,7 +35,7 @@
#include <string.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-exporter.h"
#include "core/na-export-format.h"
@@ -81,7 +81,7 @@ struct _NactAssistantExportPrivate {
};
typedef struct {
- NAObjectItem *item;
+ FMAObjectItem *item;
GSList *msg;
gchar *fname;
gchar *format;
@@ -305,7 +305,7 @@ instance_dispose( GObject *window )
g_object_unref( self->private->items_view );
if( self->private->selected_items ){
- self->private->selected_items = na_object_free_items( self->private->selected_items );
+ self->private->selected_items = fma_object_free_items( self->private->selected_items
);
}
assistant = GTK_ASSISTANT( base_window_get_gtk_toplevel( BASE_WINDOW( window )));
@@ -579,11 +579,11 @@ on_items_tree_view_selection_changed( NactAssistantExport *window, GList *select
( void * ) selected_items, g_list_length( selected_items ), ( void * ) user_data );
if( window->private->selected_items ){
- window->private->selected_items = na_object_free_items(
window->private->selected_items );
+ window->private->selected_items = fma_object_free_items(
window->private->selected_items );
}
enabled = ( g_list_length( selected_items ) > 0 );
- window->private->selected_items = na_object_copyref_items( selected_items );
+ window->private->selected_items = fma_object_copyref_items( selected_items );
assistant = GTK_ASSISTANT( base_window_get_gtk_toplevel( BASE_WINDOW( window )));
page = gtk_assistant_get_nth_page( assistant, ASSIST_PAGE_ACTIONS_SELECTION );
@@ -687,7 +687,7 @@ assist_prepare_confirm( NactAssistantExport *window, GtkAssistant *assistant, Gt
*/
text = NULL;
for( it = window->private->selected_items ; it ; it = it->next ){
- label_item = na_object_get_label( it->data );
+ label_item = fma_object_get_label( it->data );
if( text ){
tmp = g_strdup_printf( "%s\n%s", text, label_item );
g_free( text );
@@ -774,7 +774,7 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
str = g_new0( ExportStruct, 1 );
window->private->results = g_list_append( window->private->results, str );
- str->item = NA_OBJECT_ITEM( na_object_get_origin( FMA_IDUPLICABLE( ia->data )));
+ str->item = FMA_OBJECT_ITEM( fma_object_get_origin( FMA_IDUPLICABLE( ia->data )));
str->format = na_settings_get_string( NA_IPREFS_EXPORT_PREFERRED_FORMAT, NULL, NULL );
g_return_if_fail( str->format && strlen( str->format ));
@@ -834,7 +834,7 @@ assist_prepare_exportdone( NactAssistantExport *window, GtkAssistant *assistant,
*/
str = ( ExportStruct * ) ir->data;
color = str->fname ? "blue" : "red";
- item_label = na_object_get_label( str->item );
+ item_label = fma_object_get_label( str->item );
text = g_markup_printf_escaped( "<span foreground=\"%s\">%s</span>", color, item_label );
label = gtk_label_new( NULL );
gtk_label_set_markup( GTK_LABEL( label ), text );
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index 95622f2..28d136c 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -35,7 +35,7 @@
#include <glib/gi18n.h>
#include <string.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-core-utils.h>
#include <core/na-import-mode.h>
@@ -117,7 +117,7 @@ static void runtime_init_duplicates( NactAssistantImport *window, GtkAs
static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
static void prepare_confirm( NactAssistantImport *window, GtkAssistant *assistant, GtkWidget *page
);
static void assistant_apply( BaseAssistant *window, GtkAssistant *assistant );
-static NAObjectItem *check_for_existence( const NAObjectItem *, NactMainWindow *window );
+static FMAObjectItem *check_for_existence( const FMAObjectItem *, NactMainWindow *window );
static void prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWidget
*page );
static void free_results( GList *list );
@@ -699,7 +699,7 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
insertable_items = g_list_reverse( insertable_items );
items_view = nact_main_window_get_items_view( NACT_MAIN_WINDOW( main_window ));
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), insertable_items, NULL );
- na_object_free_items( insertable_items );
+ fma_object_free_items( insertable_items );
}
/* contrarily, the tree store may or not take a new reference on overriding
@@ -712,15 +712,15 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
}
}
-static NAObjectItem *
-check_for_existence( const NAObjectItem *item, NactMainWindow *window )
+static FMAObjectItem *
+check_for_existence( const FMAObjectItem *item, NactMainWindow *window )
{
static const gchar *thisfn = "nact_assistant_import_check_for_existence";
NactTreeView *items_view;
- NAObjectItem *exists;
+ FMAObjectItem *exists;
gchar *importing_id;
- importing_id = na_object_get_id( item );
+ importing_id = fma_object_get_id( item );
g_debug( "%s: item=%p (%s), importing_id=%s",
thisfn, ( void * ) item, G_OBJECT_TYPE_NAME( item ), importing_id );
@@ -799,8 +799,8 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
if( result->imported ){
/* i18n: indicate that the file has been successfully imported */
text = g_strdup( _( "Import OK" ));
- id = na_object_get_id( result->imported );
- item_label = na_object_get_label( result->imported );
+ id = fma_object_get_id( result->imported );
+ item_label = fma_object_get_label( result->imported );
/* i18n: this is the globally unique identifier and the label of the newly imported
action */
text2 = g_strdup_printf( _( "Id.: %s\t%s" ), id, item_label);
g_free( item_label );
@@ -838,7 +838,7 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
/* release here our reference on overriding items
*/
if( window->private->overriden ){
- na_object_free_items( window->private->overriden );
+ fma_object_free_items( window->private->overriden );
}
g_object_set( G_OBJECT( window ), BASE_PROP_WARN_ON_ESCAPE, FALSE, NULL );
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index c7510ad..d42fb8b 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -34,7 +34,7 @@
#include <gtk/gtk.h>
#include <string.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-exporter.h"
#include "core/na-export-format.h"
@@ -114,7 +114,7 @@ static void get_from_dnd_clipboard_callback( GtkClipboard *clipboard, GtkSelec
static void clear_dnd_clipboard_callback( GtkClipboard *clipboard, NactClipboardDndData *data );
static gchar *export_rows( NactClipboard *clipboard, GList *rows, const gchar *dest_folder );
static gchar *export_objects( NactClipboard *clipboard, GList *objects );
-static gchar *export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest_folder, GList
**exported, gboolean first );
+static gchar *export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *dest_folder,
GList **exported, gboolean first );
static void get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionData
*selection_data, guint info, NactClipboard *clipboard );
static void clear_primary_clipboard( NactClipboard *clipboard );
@@ -492,7 +492,7 @@ export_rows( NactClipboard *clipboard, GList *rows, const gchar *dest_folder )
GList *exported, *irow;
GtkTreePath *path;
GtkTreeIter iter;
- NAObject *object;
+ FMAObject *object;
gchar *buffer;
gboolean first;
@@ -532,7 +532,7 @@ export_objects( NactClipboard *clipboard, GList *objects )
GString *data;
GList *exported;
GList *iobj;
- NAObject *object;
+ FMAObject *object;
gboolean first;
first = TRUE;
@@ -541,7 +541,7 @@ export_objects( NactClipboard *clipboard, GList *objects )
data = g_string_new( "" );
for( iobj = objects ; iobj ; iobj = iobj->next ){
- object = NA_OBJECT( iobj->data );
+ object = FMA_OBJECT( iobj->data );
buffer = export_row_object( clipboard, object, NULL, &exported, first );
if( buffer && strlen( buffer )){
data = g_string_append( data, buffer );
@@ -563,13 +563,13 @@ export_objects( NactClipboard *clipboard, GList *objects )
* exported twice
*/
static gchar *
-export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest_folder, GList **exported,
gboolean first )
+export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *dest_folder, GList **exported,
gboolean first )
{
static const gchar *thisfn = "nact_clipboard_export_row_object";
GList *subitems, *isub;
NactApplication *application;
NAUpdater *updater;
- NAObjectItem *item;
+ FMAObjectItem *item;
gchar *item_label;
gint index;
GString *data;
@@ -582,8 +582,8 @@ export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest
/* if we have a menu, first export the subitems
*/
- if( NA_IS_OBJECT_MENU( object )){
- subitems = na_object_get_items( object );
+ if( FMA_IS_OBJECT_MENU( object )){
+ subitems = fma_object_get_items( object );
for( isub = subitems ; isub ; isub = isub->next ){
buffer = export_row_object( clipboard, isub->data, dest_folder, exported, first );
@@ -595,13 +595,13 @@ export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest
}
}
- /* only export NAObjectItem type
+ /* only export FMAObjectItem type
* here, object may be a menu, an action or a profile
*/
msgs = NULL;
- item = ( NAObjectItem * ) object;
- if( NA_IS_OBJECT_PROFILE( object )){
- item = NA_OBJECT_ITEM( na_object_get_parent( object ));
+ item = ( FMAObjectItem * ) object;
+ if( FMA_IS_OBJECT_PROFILE( object )){
+ item = FMA_OBJECT_ITEM( fma_object_get_parent( object ));
}
application = NACT_APPLICATION(
@@ -611,7 +611,7 @@ export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest
index = g_list_index( *exported, ( gconstpointer ) item );
if( index == -1 ){
- item_label = na_object_get_label( item );
+ item_label = fma_object_get_label( item );
g_debug( "%s: exporting %s", thisfn, item_label );
g_free( item_label );
@@ -648,7 +648,7 @@ export_row_object( NactClipboard *clipboard, NAObject *object, const gchar *dest
/**
* nact_clipboard_primary_set:
* @clipboard: this #NactClipboard object.
- * @items: a list of #NAObject items
+ * @items: a list of #FMAObject items
* @mode: where do these items come from ?
* Or what is the operation which has led the items to the clipboard?
*
@@ -690,7 +690,7 @@ nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode )
clear_primary_clipboard( clipboard );
}
- na_object_item_count_items( items,
+ fma_object_item_count_items( items,
( gint * ) &user_data->nb_menus,
( gint * ) &user_data->nb_actions,
( gint * ) &user_data->nb_profiles,
@@ -698,7 +698,7 @@ nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode )
for( it = items ; it ; it = it->next ){
user_data->items =
- g_list_prepend( user_data->items, na_object_duplicate( it->data,
DUPLICATE_REC ));
+ g_list_prepend( user_data->items, fma_object_duplicate( it->data,
DUPLICATE_REC ));
}
user_data->items = g_list_reverse( user_data->items );
@@ -732,7 +732,7 @@ nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel )
GtkSelectionData *selection;
PrimaryData *user_data;
GList *it;
- NAObject *obj;
+ FMAObject *obj;
g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
g_return_val_if_fail( NACT_IS_CLIPBOARD( clipboard ), NULL );
@@ -748,8 +748,8 @@ nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel )
if( user_data ){
for( it = user_data->items ; it ; it = it->next ){
- obj = NA_OBJECT( na_object_duplicate( it->data, DUPLICATE_REC ));
- na_object_set_origin( obj, NULL );
+ obj = FMA_OBJECT( fma_object_duplicate( it->data, DUPLICATE_REC ));
+ fma_object_set_origin( obj, NULL );
items = g_list_prepend( items, obj );
}
items = g_list_reverse( items );
@@ -903,7 +903,7 @@ dump_primary_clipboard( NactClipboard *clipboard )
g_debug( "%s: user_data->mode=%d (%s)", thisfn, user_data->mode, mode
);
g_free( mode );
for( it = user_data->items ; it ; it = it->next ){
- na_object_object_dump( NA_OBJECT( it->data ));
+ fma_object_object_dump( FMA_OBJECT( it->data ));
}
}
diff --git a/src/nact/nact-export-ask.c b/src/nact/nact-export-ask.c
index 5913727..5da3662 100644
--- a/src/nact/nact-export-ask.c
+++ b/src/nact/nact-export-ask.c
@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-exporter.h"
#include "core/na-export-format.h"
@@ -50,7 +50,7 @@
struct _NactExportAskPrivate {
gboolean dispose_has_run;
gboolean preferences_locked;
- NAObjectItem *item;
+ FMAObjectItem *item;
gchar *format;
gboolean format_mandatory;
gboolean keep_last_choice;
@@ -273,7 +273,7 @@ instance_finalize( GObject *dialog )
/**
* nact_export_ask_user:
- * @item: the NAObjectItem to be exported.
+ * @item: the FMAObjectItem to be exported.
* @first: whether this is the first call of a serie.
* On a first call, the user is really asked for his choice.
* The next times, the 'keep-last-choice' flag will be considered.
@@ -292,7 +292,7 @@ instance_finalize( GObject *dialog )
* becomes his new preferred export format.
*/
gchar *
-nact_export_ask_user( NAObjectItem *item, gboolean first )
+nact_export_ask_user( FMAObjectItem *item, gboolean first )
{
static const gchar *thisfn = "nact_export_ask_user";
NactExportAsk *editor;
@@ -380,9 +380,9 @@ on_base_initialize_window( NactExportAsk *editor, gpointer user_data )
g_debug( "%s: dialog=%p, user_data=%p", thisfn, ( void * ) editor, ( void * ) user_data );
- item_label = na_object_get_label( priv->item );
+ item_label = fma_object_get_label( priv->item );
- if( NA_IS_OBJECT_ACTION( priv->item )){
+ if( FMA_IS_OBJECT_ACTION( priv->item )){
/* i18n: The action <label> is about to be exported */
label = g_strdup_printf( _( "The action \"%s\" is about to be exported." ),
item_label );
} else {
diff --git a/src/nact/nact-export-ask.h b/src/nact/nact-export-ask.h
index c526b40..8fac5fc 100644
--- a/src/nact/nact-export-ask.h
+++ b/src/nact/nact-export-ask.h
@@ -45,7 +45,7 @@
* - a 'NoImport' capability is provided by clicking on Cancel button.
*/
-#include "api/na-object-item.h"
+#include "api/fma-object-item.h"
#include "base-dialog.h"
@@ -75,7 +75,7 @@ typedef struct {
GType nact_export_ask_get_type( void );
-gchar *nact_export_ask_user ( NAObjectItem *item,
+gchar *nact_export_ask_user ( FMAObjectItem *item,
gboolean first );
G_END_DECLS
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index 9974e56..73ff5ba 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -35,7 +35,7 @@
#include <string.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
#include "core/na-io-provider.h"
@@ -84,10 +84,10 @@ static void on_label_changed( GtkEntry *entry, NactIActionTab *instance
static void set_label_label( NactIActionTab *instance, const gchar *color );
static void on_target_toolbar_toggled( GtkToggleButton *button, NactIActionTab *instance );
static void on_toolbar_same_label_toggled( GtkToggleButton *button, NactIActionTab *instance );
-static void toolbar_same_label_set_sensitive( NactIActionTab *instance, NAObjectItem *item );
-static void setup_toolbar_label( NactIActionTab *instance, NAObjectItem *item, const gchar *label );
+static void toolbar_same_label_set_sensitive( NactIActionTab *instance, FMAObjectItem *item );
+static void setup_toolbar_label( NactIActionTab *instance, FMAObjectItem *item, const gchar *label );
static void on_toolbar_label_changed( GtkEntry *entry, NactIActionTab *instance );
-static void toolbar_label_set_sensitive( NactIActionTab *instance, NAObjectItem *item );
+static void toolbar_label_set_sensitive( NactIActionTab *instance, FMAObjectItem *item );
static void on_tooltip_changed( GtkEntry *entry, NactIActionTab *instance );
static void on_icon_browse( GtkButton *button, NactIActionTab *instance );
static void on_icon_changed( GtkEntry *entry, NactIActionTab *instance );
@@ -199,7 +199,7 @@ nact_iaction_tab_init( NactIActionTab *instance )
* GTK_ICON_SIZE_DND : 32x32
* GTK_ICON_SIZE_DIALOG : 48x48
*
- * icon is rendered for GTK_ICON_SIZE_MENU (na_object_item_get_pixbuf)
+ * icon is rendered for GTK_ICON_SIZE_MENU (fma_object_item_get_pixbuf)
*
* Starting with 3.0.3, the ComboBox is dynamically created into its container.
* Starting with 3.1.0, the ComboBox is replaced with a GtkEntry (thanks to new
@@ -320,10 +320,10 @@ on_main_item_updated( NactIActionTab *instance, FMAIContext *context, guint data
g_return_if_fail( instance && NACT_IS_IACTION_TAB( instance ));
- if( context && NA_IS_OBJECT_ITEM( context )){
+ if( context && FMA_IS_OBJECT_ITEM( context )){
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ActionMenuLabelEntry" );
g_return_if_fail( label_widget && GTK_IS_ENTRY( label_widget ));
- label = na_object_get_label( context );
+ label = fma_object_get_label( context );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
g_free( label );
}
@@ -335,7 +335,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIActi
static const gchar *thisfn = "nact_iaction_tab_on_tree_selection_changed";
guint count_selected;
gboolean enable_tab;
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean editable;
gboolean target_selection, target_location, target_toolbar;
gboolean enable_label;
@@ -370,34 +370,34 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIActi
target_selection =
enable_tab &&
item != NULL &&
- NA_IS_OBJECT_ACTION( item ) &&
- na_object_is_target_selection( item );
+ FMA_IS_OBJECT_ACTION( item ) &&
+ fma_object_is_target_selection( item );
target_location =
enable_tab &&
item != NULL &&
- NA_IS_OBJECT_ACTION( item ) &&
- na_object_is_target_location( item );
+ FMA_IS_OBJECT_ACTION( item ) &&
+ fma_object_is_target_location( item );
target_toolbar =
enable_tab &&
item != NULL &&
- NA_IS_OBJECT_ACTION( item ) &&
- na_object_is_target_toolbar( item );
+ FMA_IS_OBJECT_ACTION( item ) &&
+ fma_object_is_target_toolbar( item );
toggle = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ActionTargetSelectionButton" ));
- gtk_toggle_button_set_active( toggle, target_selection || ( item && NA_IS_OBJECT_MENU( item )));
- gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
+ gtk_toggle_button_set_active( toggle, target_selection || ( item && FMA_IS_OBJECT_MENU( item )));
+ gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && FMA_IS_OBJECT_ACTION( item ));
base_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
toggle = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ActionTargetLocationButton" ));
- gtk_toggle_button_set_active( toggle, target_location || ( item && NA_IS_OBJECT_MENU( item )));
- gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
+ gtk_toggle_button_set_active( toggle, target_location || ( item && FMA_IS_OBJECT_MENU( item )));
+ gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && FMA_IS_OBJECT_ACTION( item ));
base_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
- enable_label = target_selection || target_location || ( item && NA_IS_OBJECT_MENU( item ));
+ enable_label = target_selection || target_location || ( item && FMA_IS_OBJECT_MENU( item ));
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionMenuLabelEntry" );
- label = item ? na_object_get_label( item ) : g_strdup( "" );
+ label = item ? fma_object_get_label( item ) : g_strdup( "" );
label = label ? label : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
if( item ){
@@ -409,17 +409,17 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIActi
toggle = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ActionTargetToolbarButton" ));
gtk_toggle_button_set_active( toggle, target_toolbar );
- gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
+ gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && FMA_IS_OBJECT_ACTION( item ));
base_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
toggle = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ToolbarSameLabelButton" ));
- same_label = item && NA_IS_OBJECT_ACTION( item ) ? na_object_is_toolbar_same_label( item ) : FALSE;
+ same_label = item && FMA_IS_OBJECT_ACTION( item ) ? fma_object_is_toolbar_same_label( item ) : FALSE;
gtk_toggle_button_set_active( toggle, same_label );
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), target_toolbar );
base_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionToolbarLabelEntry"
);
- label = item && NA_IS_OBJECT_ACTION( item ) ? na_object_get_toolbar_label( item ) : g_strdup( "" );
+ label = item && FMA_IS_OBJECT_ACTION( item ) ? fma_object_get_toolbar_label( item ) : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
g_free( label );
gtk_widget_set_sensitive( label_widget, target_toolbar && !same_label );
@@ -429,14 +429,14 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIActi
gtk_widget_set_sensitive( label_widget, target_toolbar && !same_label );
tooltip_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionTooltipEntry" );
- tooltip = item ? na_object_get_tooltip( item ) : g_strdup( "" );
+ tooltip = item ? fma_object_get_tooltip( item ) : g_strdup( "" );
tooltip = tooltip ? tooltip : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( tooltip_widget ), tooltip );
g_free( tooltip );
base_gtk_utils_set_editable( G_OBJECT( tooltip_widget ), editable );
icon_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionIconEntry" );
- icon = item ? na_object_get_icon( item ) : g_strdup( "" );
+ icon = item ? fma_object_get_icon( item ) : g_strdup( "" );
icon = icon ? icon : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( icon_widget ), icon );
g_free( icon );
@@ -452,7 +452,7 @@ static void
on_target_selection_toggled( GtkToggleButton *button, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_target_selection_toggled";
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean is_target;
gboolean editable;
IActionData *data;
@@ -477,11 +477,11 @@ on_target_selection_toggled( GtkToggleButton *button, NactIActionTab *instance )
thisfn, ( void * ) item, item ? G_OBJECT_TYPE_NAME( item ) : "null",
editable ? "True":"False" );
- if( item && NA_IS_OBJECT_ACTION( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
is_target = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_target_selection( item, is_target );
+ fma_object_set_target_selection( item, is_target );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
0 );
} else {
@@ -497,7 +497,7 @@ static void
on_target_location_toggled( GtkToggleButton *button, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_target_location_toggled";
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean is_target;
gboolean editable;
IActionData *data;
@@ -522,11 +522,11 @@ on_target_location_toggled( GtkToggleButton *button, NactIActionTab *instance )
thisfn, ( void * ) item, item ? G_OBJECT_TYPE_NAME( item ) : "null",
editable ? "True":"False" );
- if( item && NA_IS_OBJECT_ACTION( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
is_target = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_target_location( item, is_target );
+ fma_object_set_target_location( item, is_target );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
0 );
} else {
@@ -541,7 +541,7 @@ on_target_location_toggled( GtkToggleButton *button, NactIActionTab *instance )
static void
check_for_label( NactIActionTab *instance, GtkEntry *entry, const gchar *label )
{
- NAObjectItem *item;
+ FMAObjectItem *item;
NactStatusbar *bar;
g_return_if_fail( NACT_IS_IACTION_TAB( instance ));
@@ -569,7 +569,7 @@ static void
on_label_changed( GtkEntry *entry, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_label_changed";
- NAObjectItem *item;
+ FMAObjectItem *item;
const gchar *label;
IActionData *data;
@@ -590,10 +590,10 @@ on_label_changed( GtkEntry *entry, NactIActionTab *instance )
if( item ){
label = gtk_entry_get_text( entry );
- na_object_set_label( item, label );
+ fma_object_set_label( item, label );
check_for_label( instance, entry, label );
- if( NA_IS_OBJECT_ACTION( item )){
+ if( FMA_IS_OBJECT_ACTION( item )){
setup_toolbar_label( instance, item, label );
}
@@ -618,7 +618,7 @@ static void
on_target_toolbar_toggled( GtkToggleButton *button, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_target_toolbar_toggled";
- NAObjectAction *item;
+ FMAObjectAction *item;
gboolean is_target;
gboolean editable;
IActionData *data;
@@ -643,14 +643,14 @@ on_target_toolbar_toggled( GtkToggleButton *button, NactIActionTab *instance )
thisfn, ( void * ) item, item ? G_OBJECT_TYPE_NAME( item ) : "null",
editable ? "True":"False" );
- if( item && NA_IS_OBJECT_ACTION( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
is_target = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_target_toolbar( item, is_target );
+ fma_object_set_target_toolbar( item, is_target );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
0 );
- toolbar_same_label_set_sensitive( instance, NA_OBJECT_ITEM( item ));
- toolbar_label_set_sensitive( instance, NA_OBJECT_ITEM( item ));
+ toolbar_same_label_set_sensitive( instance, FMA_OBJECT_ITEM( item ));
+ toolbar_label_set_sensitive( instance, FMA_OBJECT_ITEM( item ));
} else {
g_signal_handlers_block_by_func(( gpointer ) button,
on_target_toolbar_toggled, instance );
@@ -665,7 +665,7 @@ static void
on_toolbar_same_label_toggled( GtkToggleButton *button, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_toolbar_same_label_toggled";
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean same_label;
gboolean editable;
gchar *label;
@@ -692,22 +692,22 @@ on_toolbar_same_label_toggled( GtkToggleButton *button, NactIActionTab *instance
thisfn, ( void * ) item, item ? G_OBJECT_TYPE_NAME( item ) : "null",
editable ? "True":"False" );
- if( item && NA_IS_OBJECT_ACTION( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
same_label = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_toolbar_same_label( NA_OBJECT_ACTION( item ), same_label );
+ fma_object_set_toolbar_same_label( FMA_OBJECT_ACTION( item ), same_label );
if( same_label ){
- label = na_object_get_label( item );
+ label = fma_object_get_label( item );
label_widget = base_window_get_widget( BASE_WINDOW( instance ),
"ActionToolbarLabelEntry" );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
g_free( label );
}
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
0 );
- toolbar_same_label_set_sensitive( instance, NA_OBJECT_ITEM( item ));
- toolbar_label_set_sensitive( instance, NA_OBJECT_ITEM( item ));
+ toolbar_same_label_set_sensitive( instance, FMA_OBJECT_ITEM( item ));
+ toolbar_label_set_sensitive( instance, FMA_OBJECT_ITEM( item ));
} else {
g_signal_handlers_block_by_func(( gpointer ) button,
on_toolbar_same_label_toggled, instance );
@@ -719,15 +719,15 @@ on_toolbar_same_label_toggled( GtkToggleButton *button, NactIActionTab *instance
}
static void
-toolbar_same_label_set_sensitive( NactIActionTab *instance, NAObjectItem *item )
+toolbar_same_label_set_sensitive( NactIActionTab *instance, FMAObjectItem *item )
{
GtkToggleButton *toggle;
gboolean target_toolbar;
gboolean readonly;
- readonly = item ? na_object_is_readonly( item ) : FALSE;
+ readonly = item ? fma_object_is_readonly( item ) : FALSE;
toggle = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ToolbarSameLabelButton"
));
- target_toolbar = item && NA_IS_OBJECT_ACTION( item ) ? na_object_is_target_toolbar( NA_OBJECT_ACTION(
item )) : FALSE;
+ target_toolbar = item && FMA_IS_OBJECT_ACTION( item ) ? fma_object_is_target_toolbar(
FMA_OBJECT_ACTION( item )) : FALSE;
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), target_toolbar && !readonly );
}
@@ -735,12 +735,12 @@ toolbar_same_label_set_sensitive( NactIActionTab *instance, NAObjectItem *item )
* setup the label of the toolbar according to the toolbar_same_label flag
*/
static void
-setup_toolbar_label( NactIActionTab *instance, NAObjectItem *item, const gchar *label )
+setup_toolbar_label( NactIActionTab *instance, FMAObjectItem *item, const gchar *label )
{
GtkWidget *label_widget;
- if( item && NA_IS_OBJECT_ACTION( item )){
- if( na_object_is_toolbar_same_label( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
+ if( fma_object_is_toolbar_same_label( item )){
label_widget = base_window_get_widget( BASE_WINDOW( instance ),
"ActionToolbarLabelEntry" );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
}
@@ -751,7 +751,7 @@ static void
on_toolbar_label_changed( GtkEntry *entry, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_toolbar_label_changed";
- NAObjectItem *item;
+ FMAObjectItem *item;
const gchar *label;
IActionData *data;
@@ -770,23 +770,23 @@ on_toolbar_label_changed( GtkEntry *entry, NactIActionTab *instance )
MAIN_PROP_ITEM, &item,
NULL );
- if( item && NA_IS_OBJECT_ACTION( item )){
+ if( item && FMA_IS_OBJECT_ACTION( item )){
label = gtk_entry_get_text( entry );
- na_object_set_toolbar_label( NA_OBJECT_ACTION( item ), label );
+ fma_object_set_toolbar_label( FMA_OBJECT_ACTION( item ), label );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item, 0 );
}
}
}
static void
-toolbar_label_set_sensitive( NactIActionTab *instance, NAObjectItem *item )
+toolbar_label_set_sensitive( NactIActionTab *instance, FMAObjectItem *item )
{
gboolean is_action;
gboolean same_label;
GtkWidget *label_widget;
- is_action = item && NA_IS_OBJECT_ACTION( item );
- same_label = is_action ? na_object_is_toolbar_same_label( NA_OBJECT_ACTION( item )) : FALSE;
+ is_action = item && FMA_IS_OBJECT_ACTION( item );
+ same_label = is_action ? fma_object_is_toolbar_same_label( FMA_OBJECT_ACTION( item )) : FALSE;
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionToolbarLabelEntry" );
gtk_widget_set_sensitive( label_widget, is_action && !same_label );
}
@@ -795,7 +795,7 @@ static void
on_tooltip_changed( GtkEntry *entry, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_tooltip_changed";
- NAObjectItem *item;
+ FMAObjectItem *item;
IActionData *data;
g_return_if_fail( NACT_IS_IACTION_TAB( instance ));
@@ -814,7 +814,7 @@ on_tooltip_changed( GtkEntry *entry, NactIActionTab *instance )
NULL );
if( item ){
- na_object_set_tooltip( item, gtk_entry_get_text( entry ));
+ fma_object_set_tooltip( item, gtk_entry_get_text( entry ));
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item, 0 );
}
}
@@ -824,7 +824,7 @@ static void
on_icon_browse( GtkButton *button, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_icon_browse";
- NAObjectItem *item;
+ FMAObjectItem *item;
GtkWidget *icon_entry;
gchar *icon_name;
gchar *new_icon_name;
@@ -842,7 +842,7 @@ on_icon_browse( GtkButton *button, NactIActionTab *instance )
NULL );
if( item ){
- icon_name = na_object_get_icon( item );
+ icon_name = fma_object_get_icon( item );
new_icon_name = nact_icon_chooser_choose_icon( NACT_MAIN_WINDOW( instance ), icon_name );
if( g_utf8_collate( icon_name, new_icon_name ) != 0 ){
@@ -860,7 +860,7 @@ on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_on_icon_changed";
GtkImage *image;
- NAObjectItem *item;
+ FMAObjectItem *item;
gchar *icon_name;
IActionData *data;
@@ -882,11 +882,11 @@ on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
if( item ){
if( !data->on_selection_change ){
icon_name = g_strdup( gtk_entry_get_text( icon_entry ));
- na_object_set_icon( item, icon_name );
+ fma_object_set_icon( item, icon_name );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
MAIN_DATA_ICON );
} else {
- icon_name = na_object_get_icon( item );
+ icon_name = fma_object_get_icon( item );
}
}
diff --git a/src/nact/nact-iaction-tab.h b/src/nact/nact-iaction-tab.h
index bd31cba..53de129 100644
--- a/src/nact/nact-iaction-tab.h
+++ b/src/nact/nact-iaction-tab.h
@@ -38,8 +38,8 @@
* This interface implements the "Nautilus Menu Item" tab of the notebook.
*
* Entry fields are enabled, as soon as an edited item has been set as a
- * property of the main window, Fields are those of NAObjectItem (i.e.
- * not NAObjectProfile, not FMAIContext, but may be NAObjectAction specific).
+ * property of the main window, Fields are those of FMAObjectItem (i.e.
+ * not FMAObjectProfile, not FMAIContext, but may be FMAObjectAction specific).
*/
#include <glib-object.h>
diff --git a/src/nact/nact-ibasenames-tab.c b/src/nact/nact-ibasenames-tab.c
index 85db9f9..c55ffe5 100644
--- a/src/nact/nact-ibasenames-tab.c
+++ b/src/nact/nact-ibasenames-tab.c
@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -255,7 +255,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIBase
data->on_selection_change = TRUE;
matchcase_button = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"BasenamesMatchcaseButton" ));
- matchcase = context ? na_object_get_matchcase( context ) : FALSE;
+ matchcase = context ? fma_object_get_matchcase( context ) : FALSE;
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( matchcase_button ), matchcase );
base_gtk_utils_set_editable( G_OBJECT( matchcase_button ), editable );
@@ -281,7 +281,7 @@ on_matchcase_toggled( GtkToggleButton *button, NactIBasenamesTab *instance )
matchcase = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_matchcase( context, matchcase );
+ fma_object_set_matchcase( context, matchcase );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED,
context, 0 );
} else {
@@ -296,13 +296,13 @@ on_matchcase_toggled( GtkToggleButton *button, NactIBasenamesTab *instance )
static GSList *
get_basenames( void *context )
{
- return( na_object_get_basenames( context ));
+ return( fma_object_get_basenames( context ));
}
static void
set_basenames( void *context, GSList *filters )
{
- na_object_set_basenames( context, filters );
+ fma_object_set_basenames( context, filters );
}
static IBasenamesData *
diff --git a/src/nact/nact-icapabilities-tab.c b/src/nact/nact-icapabilities-tab.c
index ef90359..dd8823f 100644
--- a/src/nact/nact-icapabilities-tab.c
+++ b/src/nact/nact-icapabilities-tab.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -243,13 +243,13 @@ on_add_clicked( GtkButton *button, NactICapabilitiesTab *instance )
static GSList *
get_capabilities( FMAIContext *context )
{
- return( na_object_get_capabilities( context ));
+ return( fma_object_get_capabilities( context ));
}
static void
set_capabilities( FMAIContext *context, GSList *list )
{
- na_object_set_capabilities( context, list );
+ fma_object_set_capabilities( context, list );
}
static void
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 3f959a3..aa78cd0 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -35,7 +35,7 @@
#include <string.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-factory-object.h"
#include "core/na-gtk-utils.h"
@@ -98,7 +98,7 @@ static void on_path_changed( GtkEntry *entry, NactICommandTab *instance
static void on_wdir_browse( GtkButton *button, NactICommandTab *instance );
static void on_wdir_changed( GtkEntry *entry, NactICommandTab *instance );
static gchar *parse_parameters( NactICommandTab *instance );
-static void update_example_label( NactICommandTab *instance, NAObjectProfile *profile );
+static void update_example_label( NactICommandTab *instance, FMAObjectProfile *profile );
static ICommandData *get_icommand_data( NactICommandTab *instance );
static void on_instance_finalized( gpointer user_data, NactICommandTab *instance );
@@ -296,9 +296,9 @@ on_main_item_updated( NactICommandTab *instance, FMAIContext *context, guint dat
g_return_if_fail( instance && NACT_IS_ICOMMAND_TAB( instance ));
- if( NA_IS_OBJECT_PROFILE( context )){
+ if( FMA_IS_OBJECT_PROFILE( context )){
label_widget = get_label_entry( instance );
- label = na_object_get_label( context );
+ label = fma_object_get_label( context );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
g_free( label );
}
@@ -308,7 +308,7 @@ static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactICommandTab *instance )
{
static const gchar *thisfn = "nact_icommand_tab_on_tree_selection_changed";
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
gboolean editable;
gboolean enable_tab;
GtkWidget *label_entry, *path_entry, *parameters_entry, *wdir_entry;
@@ -339,7 +339,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIComm
data->on_selection_change = TRUE;
label_entry = get_label_entry( instance );
- label = profile ? na_object_get_label( profile ) : g_strdup( "" );
+ label = profile ? fma_object_get_label( profile ) : g_strdup( "" );
label = label ? label : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( label_entry ), label );
g_free( label );
@@ -347,7 +347,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIComm
base_gtk_utils_set_editable( G_OBJECT( label_entry ), editable );
path_entry = get_path_entry( instance );
- path = profile ? na_object_get_path( profile ) : g_strdup( "" );
+ path = profile ? fma_object_get_path( profile ) : g_strdup( "" );
path = path ? path : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( path_entry ), path );
g_free( path );
@@ -359,7 +359,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIComm
base_gtk_utils_set_editable( G_OBJECT( path_button ), editable );
parameters_entry = get_parameters_entry( instance );
- parameters = profile ? na_object_get_parameters( profile ) : g_strdup( "" );
+ parameters = profile ? fma_object_get_parameters( profile ) : g_strdup( "" );
parameters = parameters ? parameters : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( parameters_entry ), parameters );
g_free( parameters );
@@ -372,7 +372,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIComm
update_example_label( instance, profile );
wdir_entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "WorkingDirectoryEntry" );
- wdir = profile ? na_object_get_working_dir( profile ) : g_strdup( "" );
+ wdir = profile ? fma_object_get_working_dir( profile ) : g_strdup( "" );
wdir = wdir ? wdir : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( wdir_entry ), wdir );
g_free( wdir );
@@ -472,7 +472,7 @@ legend_dialog_show( NactICommandTab *instance )
static void
on_label_changed( GtkEntry *entry, NactICommandTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
const gchar *label;
ICommandData *data;
@@ -486,7 +486,7 @@ on_label_changed( GtkEntry *entry, NactICommandTab *instance )
if( profile ){
label = gtk_entry_get_text( entry );
- na_object_set_label( profile, label );
+ fma_object_set_label( profile, label );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile,
MAIN_DATA_LABEL );
}
}
@@ -516,7 +516,7 @@ on_legend_dialog_deleted( GtkWidget *dialog, GdkEvent *event, NactICommandTab *i
static void
on_parameters_changed( GtkEntry *entry, NactICommandTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
ICommandData *data;
data = get_icommand_data( instance );
@@ -528,7 +528,7 @@ on_parameters_changed( GtkEntry *entry, NactICommandTab *instance )
NULL );
if( profile ){
- na_object_set_parameters( profile, gtk_entry_get_text( entry ));
+ fma_object_set_parameters( profile, gtk_entry_get_text( entry ));
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
update_example_label( instance, profile );
}
@@ -547,7 +547,7 @@ on_path_browse( GtkButton *button, NactICommandTab *instance )
static void
on_path_changed( GtkEntry *entry, NactICommandTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
ICommandData *data;
data = get_icommand_data( instance );
@@ -559,7 +559,7 @@ on_path_changed( GtkEntry *entry, NactICommandTab *instance )
NULL );
if( profile ){
- na_object_set_path( profile, gtk_entry_get_text( entry ));
+ fma_object_set_path( profile, gtk_entry_get_text( entry ));
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
update_example_label( instance, profile );
}
@@ -570,7 +570,7 @@ static void
on_wdir_browse( GtkButton *button, NactICommandTab *instance )
{
GtkWidget *wdir_entry;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
g_object_get(
G_OBJECT( instance ),
@@ -592,7 +592,7 @@ on_wdir_browse( GtkButton *button, NactICommandTab *instance )
static void
on_wdir_changed( GtkEntry *entry, NactICommandTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
ICommandData *data;
data = get_icommand_data( instance );
@@ -604,7 +604,7 @@ on_wdir_changed( GtkEntry *entry, NactICommandTab *instance )
NULL );
if( profile ){
- na_object_set_working_dir( profile, gtk_entry_get_text( entry ));
+ fma_object_set_working_dir( profile, gtk_entry_get_text( entry ));
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
}
}
@@ -634,7 +634,7 @@ parse_parameters( NactICommandTab *instance )
}
static void
-update_example_label( NactICommandTab *instance, NAObjectProfile *profile )
+update_example_label( NactICommandTab *instance, FMAObjectProfile *profile )
{
/*static const char *thisfn = "nact_iconditions_update_example_label";*/
gchar *newlabel;
diff --git a/src/nact/nact-icommand-tab.h b/src/nact/nact-icommand-tab.h
index 403bbf8..c3b37c5 100644
--- a/src/nact/nact-icommand-tab.h
+++ b/src/nact/nact-icommand-tab.h
@@ -36,7 +36,7 @@
* @include: nact/nact-icommand-tab.h
*
* This interface implements all the widgets which define the
- * actual action to be executed (from NAObjectProfile).
+ * actual action to be executed (from FMAObjectProfile).
*/
#include <glib-object.h>
diff --git a/src/nact/nact-ienvironment-tab.c b/src/nact/nact-ienvironment-tab.c
index 27fe0b6..ec4df39 100644
--- a/src/nact/nact-ienvironment-tab.c
+++ b/src/nact/nact-ienvironment-tab.c
@@ -37,7 +37,7 @@
#include <string.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
#include "core/na-desktop-environment.h"
@@ -382,7 +382,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvi
/* selection count
*/
- sel_count = context ? na_object_get_selection_count( context ) : g_strdup( "" );
+ sel_count = context ? fma_object_get_selection_count( context ) : g_strdup( "" );
fma_core_utils_selcount_get_ope_int( sel_count, &selcount_ope, &selcount_int );
set_selection_count_selection( instance, selcount_ope, selcount_int );
g_free( selcount_int );
@@ -403,7 +403,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvi
show_button = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "OnlyShowButton" );
notshow_button = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "DoNotShowButton" );
- desktops = context ? na_object_get_only_show_in( context ) : NULL;
+ desktops = context ? fma_object_get_only_show_in( context ) : NULL;
listview = GTK_TREE_VIEW( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"EnvironmentsDesktopTreeView" ));
gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( always_button ), context == NULL );
@@ -414,7 +414,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvi
gtk_widget_set_sensitive( GTK_WIDGET( listview ), TRUE );
} else {
- desktops = context ? na_object_get_not_show_in( context ) : NULL;
+ desktops = context ? fma_object_get_not_show_in( context ) : NULL;
if( desktops && g_slist_length( desktops )){
base_gtk_utils_radio_set_initial_state(
@@ -436,7 +436,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvi
/* execution environment
*/
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "TryExecEntry" );
- text = context ? na_object_get_try_exec( context ) : g_strdup( "" );
+ text = context ? fma_object_get_try_exec( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
@@ -446,21 +446,21 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvi
base_gtk_utils_set_editable( G_OBJECT( browse_button ), editable );
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ShowIfRegisteredEntry" );
- text = context ? na_object_get_show_if_registered( context ) : g_strdup( "" );
+ text = context ? fma_object_get_show_if_registered( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
base_gtk_utils_set_editable( G_OBJECT( entry ), editable );
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ShowIfTrueEntry" );
- text = context ? na_object_get_show_if_true( context ) : g_strdup( "" );
+ text = context ? fma_object_get_show_if_true( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
base_gtk_utils_set_editable( G_OBJECT( entry ), editable );
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ShowIfRunningEntry" );
- text = context ? na_object_get_show_if_running( context ) : g_strdup( "" );
+ text = context ? fma_object_get_show_if_running( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
@@ -505,7 +505,7 @@ on_selection_count_changed( NactIEnvironmentTab *instance )
if( context ){
selcount = get_selection_count_selection( instance );
- na_object_set_selection_count( context, selcount );
+ fma_object_set_selection_count( context, selcount );
g_free( selcount );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, context, 0 );
@@ -554,8 +554,8 @@ on_show_always_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *ins
if( active ){
raz_desktop_listview( instance );
- na_object_set_only_show_in( context, NULL );
- na_object_set_not_show_in( context, NULL );
+ fma_object_set_only_show_in( context, NULL );
+ fma_object_set_not_show_in( context, NULL );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED,
context, 0 );
}
@@ -590,13 +590,13 @@ on_only_show_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *insta
if( editable ){
if( active ){
raz_desktop_listview( instance );
- show = na_object_get_only_show_in( context );
+ show = fma_object_get_only_show_in( context );
if( show && g_slist_length( show )){
setup_desktop_listview( instance, show );
}
} else {
- na_object_set_only_show_in( context, NULL );
+ fma_object_set_only_show_in( context, NULL );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED,
context, 0 );
}
@@ -631,13 +631,13 @@ on_do_not_show_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *ins
if( editable ){
if( active ){
raz_desktop_listview( instance );
- show = na_object_get_not_show_in( context );
+ show = fma_object_get_not_show_in( context );
if( show && g_slist_length( show )){
setup_desktop_listview( instance, show );
}
} else {
- na_object_set_not_show_in( context, NULL );
+ fma_object_set_not_show_in( context, NULL );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED,
context, 0 );
}
@@ -685,9 +685,9 @@ on_desktop_toggled( GtkCellRendererToggle *renderer, gchar *path, NactIEnvironme
show_button = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"OnlyShowButton" );
if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( show_button ))){
- na_object_set_only_desktop( context, desktop, !state );
+ fma_object_set_only_desktop( context, desktop, !state );
} else {
- na_object_set_not_desktop( context, desktop, !state );
+ fma_object_set_not_desktop( context, desktop, !state );
}
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED,
context, 0 );
@@ -713,7 +713,7 @@ on_try_exec_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
if( context ){
text = gtk_entry_get_text( entry );
- na_object_set_try_exec( context, text );
+ fma_object_set_try_exec( context, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, context, 0 );
}
}
@@ -741,7 +741,7 @@ on_show_if_registered_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
if( context ){
text = gtk_entry_get_text( entry );
- na_object_set_show_if_registered( context, text );
+ fma_object_set_show_if_registered( context, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, context, 0 );
}
}
@@ -756,7 +756,7 @@ on_show_if_true_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
if( context ){
text = gtk_entry_get_text( entry );
- na_object_set_show_if_true( context, text );
+ fma_object_set_show_if_true( context, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, context, 0 );
}
}
@@ -771,7 +771,7 @@ on_show_if_running_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
if( context ){
text = gtk_entry_get_text( entry );
- na_object_set_show_if_running( context, text );
+ fma_object_set_show_if_running( context, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, context, 0 );
}
}
diff --git a/src/nact/nact-iexecution-tab.c b/src/nact/nact-iexecution-tab.c
index 1e7ac0f..34627ca 100644
--- a/src/nact/nact-iexecution-tab.c
+++ b/src/nact/nact-iexecution-tab.c
@@ -33,7 +33,7 @@
#include <string.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -229,7 +229,7 @@ static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIExecutionTab *instance )
{
static const gchar *thisfn = "nact_iexecution_tab_on_tree_selection_changed";
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
gboolean editable;
gboolean enable_tab;
gchar *mode;
@@ -264,7 +264,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIExec
embedded_toggle = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ExecutionModeEmbedded" );
display_toggle = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ExecutionModeDisplayOutput" );
- mode = profile ? na_object_get_execution_mode( profile ) : g_strdup( "Normal" );
+ mode = profile ? fma_object_get_execution_mode( profile ) : g_strdup( "Normal" );
gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( normal_toggle ), profile == NULL );
if( !strcmp( mode, "Normal" )){
@@ -296,12 +296,12 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIExec
frame = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "StartupModeFrame" );
gtk_widget_set_sensitive( frame, FALSE );
- notify = profile ? na_object_get_startup_notify( profile ) : FALSE;
+ notify = profile ? fma_object_get_startup_notify( profile ) : FALSE;
notify_check = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "StartupNotifyButton" );
base_gtk_utils_set_editable( G_OBJECT( notify_check ), editable );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( notify_check ), notify );
- class = profile ? na_object_get_startup_class( profile ) : g_strdup( "" );
+ class = profile ? fma_object_get_startup_class( profile ) : g_strdup( "" );
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "StartupWMClassEntry" );
gtk_entry_set_text( GTK_ENTRY( entry ), class );
base_gtk_utils_set_editable( G_OBJECT( entry ), editable );
@@ -310,7 +310,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIExec
frame = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "UserFrame" );
gtk_widget_set_sensitive( frame, FALSE );
- user = profile ? na_object_get_execute_as( profile ) : g_strdup( "" );
+ user = profile ? fma_object_get_execute_as( profile ) : g_strdup( "" );
entry = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ExecuteAsEntry" );
gtk_entry_set_text( GTK_ENTRY( entry ), user );
base_gtk_utils_set_editable( G_OBJECT( entry ), editable );
@@ -346,7 +346,7 @@ on_display_mode_toggled( GtkToggleButton *togglebutton, NactIExecutionTab *insta
static void
execution_mode_toggle( NactIExecutionTab *instance, GtkToggleButton *toggle_button, GCallback cb, const
gchar *mode )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
gboolean editable;
gboolean active;
gboolean is_normal;
@@ -363,7 +363,7 @@ execution_mode_toggle( NactIExecutionTab *instance, GtkToggleButton *toggle_butt
if( editable ){
if( active ){
- na_object_set_execution_mode( profile, mode );
+ fma_object_set_execution_mode( profile, mode );
is_normal = ( strcmp( mode, "Normal" ) == 0 );
widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"StartupNotifyButton" );
@@ -383,7 +383,7 @@ execution_mode_toggle( NactIExecutionTab *instance, GtkToggleButton *toggle_butt
static void
on_startup_notify_toggled( GtkToggleButton *toggle_button, NactIExecutionTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
gboolean editable;
gboolean active;
@@ -397,7 +397,7 @@ on_startup_notify_toggled( GtkToggleButton *toggle_button, NactIExecutionTab *in
active = gtk_toggle_button_get_active( toggle_button );
if( editable ){
- na_object_set_startup_notify( profile, active );
+ fma_object_set_startup_notify( profile, active );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
} else {
@@ -411,7 +411,7 @@ on_startup_notify_toggled( GtkToggleButton *toggle_button, NactIExecutionTab *in
static void
on_startup_class_changed( GtkEntry *entry, NactIExecutionTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
const gchar *text;
g_object_get(
@@ -421,7 +421,7 @@ on_startup_class_changed( GtkEntry *entry, NactIExecutionTab *instance )
if( profile ){
text = gtk_entry_get_text( entry );
- na_object_set_startup_class( profile, text );
+ fma_object_set_startup_class( profile, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
}
}
@@ -429,7 +429,7 @@ on_startup_class_changed( GtkEntry *entry, NactIExecutionTab *instance )
static void
on_execute_as_changed( GtkEntry *entry, NactIExecutionTab *instance )
{
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
const gchar *text;
g_object_get(
@@ -439,7 +439,7 @@ on_execute_as_changed( GtkEntry *entry, NactIExecutionTab *instance )
if( profile ){
text = gtk_entry_get_text( entry );
- na_object_set_execute_as( profile, text );
+ fma_object_set_execute_as( profile, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, profile, 0 );
}
}
diff --git a/src/nact/nact-ifolders-tab.c b/src/nact/nact-ifolders-tab.c
index fd9bbe0..58fd5e3 100644
--- a/src/nact/nact-ifolders-tab.c
+++ b/src/nact/nact-ifolders-tab.c
@@ -35,7 +35,7 @@
#include <string.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -273,13 +273,13 @@ on_browse_folder_clicked( GtkButton *button, NactIFoldersTab *instance )
static GSList *
get_folders( void *context )
{
- return( na_object_get_folders( context ));
+ return( fma_object_get_folders( context ));
}
static void
set_folders( void *context, GSList *filters )
{
- na_object_set_folders( context, filters );
+ fma_object_set_folders( context, filters );
}
static void
diff --git a/src/nact/nact-imimetypes-tab.c b/src/nact/nact-imimetypes-tab.c
index 86225df..ceb2509 100644
--- a/src/nact/nact-imimetypes-tab.c
+++ b/src/nact/nact-imimetypes-tab.c
@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -233,13 +233,13 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIMime
static GSList *
get_mimetypes( void *context )
{
- return( na_object_get_mimetypes( context ));
+ return( fma_object_get_mimetypes( context ));
}
static void
set_mimetypes( void *context, GSList *filters )
{
- na_object_set_mimetypes( context, filters );
+ fma_object_set_mimetypes( context, filters );
}
static void
diff --git a/src/nact/nact-iproperties-tab.c b/src/nact/nact-iproperties-tab.c
index 0d909a0..6144148 100644
--- a/src/nact/nact-iproperties-tab.c
+++ b/src/nact/nact-iproperties-tab.c
@@ -35,7 +35,7 @@
#include <libintl.h>
#include <string.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
#include "core/na-io-provider.h"
@@ -76,7 +76,7 @@ static void on_enabled_toggled( GtkToggleButton *button, NactIProper
static void on_readonly_toggled( GtkToggleButton *button, NactIPropertiesTab *instance );
static void on_description_changed( GtkTextBuffer *buffer, NactIPropertiesTab *instance );
static void on_shortcut_clicked( GtkButton *button, NactIPropertiesTab *instance );
-static void display_provider_name( NactIPropertiesTab *instance, NAObjectItem *item );
+static void display_provider_name( NactIPropertiesTab *instance, FMAObjectItem *item );
static IPropertiesData *get_iproperties_data( NactIPropertiesTab *instance );
static void on_instance_finalized( gpointer user_data, NactIPropertiesTab *instance );
@@ -224,7 +224,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
{
static const gchar *thisfn = "nact_iproperties_tab_on_tree_selection_changed";
guint count_selected;
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean editable;
gboolean enable_tab;
GtkNotebook *notebook;
@@ -249,7 +249,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
MAIN_PROP_EDITABLE, &editable,
NULL );
- g_return_if_fail( !item || NA_IS_OBJECT_ITEM( item ));
+ g_return_if_fail( !item || FMA_IS_OBJECT_ITEM( item ));
enable_tab = ( count_selected == 1 );
nact_main_tab_enable_page( NACT_MAIN_WINDOW( instance ), TAB_PROPERTIES, enable_tab );
@@ -262,7 +262,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
title_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionPropertiesTitle" );
label_widget = gtk_notebook_get_tab_label( notebook, page );
- if( item && NA_IS_OBJECT_MENU( item )){
+ if( item && FMA_IS_OBJECT_MENU( item )){
gtk_label_set_label( GTK_LABEL( label_widget ), _( "Me_nu" ));
gtk_label_set_markup( GTK_LABEL( title_widget ), _( "<b>Menu editable properties</b>" ));
} else {
@@ -271,19 +271,19 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
}
enabled_button = get_enabled_button( instance );
- enabled_item = item ? na_object_is_enabled( NA_OBJECT_ITEM( item )) : FALSE;
+ enabled_item = item ? fma_object_is_enabled( FMA_OBJECT_ITEM( item )) : FALSE;
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( enabled_button ), enabled_item );
base_gtk_utils_set_editable( G_OBJECT( enabled_button ), editable );
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionDescriptionText" );
buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( label_widget ));
- label = item ? na_object_get_description( item ) : g_strdup( "" );
+ label = item ? fma_object_get_description( item ) : g_strdup( "" );
gtk_text_buffer_set_text( buffer, label, -1 );
g_free( label );
base_gtk_utils_set_editable( G_OBJECT( label_widget ), editable );
shortcut_button = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"SuggestedShortcutButton" );
- shortcut = item ? na_object_get_shortcut( item ) : g_strdup( "" );
+ shortcut = item ? fma_object_get_shortcut( item ) : g_strdup( "" );
if( !shortcut || !strlen( shortcut )){
g_free( shortcut );
shortcut = g_strdup( gettext( NO_SHORTCUT ));
@@ -299,11 +299,11 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
* _not_ the writability status of the provider
*/
readonly_button = GTK_TOGGLE_BUTTON( na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ),
"ActionReadonlyButton" ));
- gtk_toggle_button_set_active( readonly_button, item ? na_object_is_readonly( item ) : FALSE );
+ gtk_toggle_button_set_active( readonly_button, item ? fma_object_is_readonly( item ) : FALSE );
base_gtk_utils_set_editable( G_OBJECT( readonly_button ), FALSE );
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionItemID" );
- label = item ? na_object_get_id( item ) : g_strdup( "" );
+ label = item ? fma_object_get_id( item ) : g_strdup( "" );
gtk_label_set_text( GTK_LABEL( label_widget ), label );
g_free( label );
@@ -323,7 +323,7 @@ on_main_item_updated( NactIPropertiesTab *instance, FMAIContext *context, guint
thisfn, ( void * ) instance,
( void * ) context, G_OBJECT_TYPE_NAME( context ), data, empty );
- display_provider_name( instance, NA_OBJECT_ITEM( context ));
+ display_provider_name( instance, FMA_OBJECT_ITEM( context ));
}
}
@@ -337,7 +337,7 @@ static void
on_enabled_toggled( GtkToggleButton *button, NactIPropertiesTab *instance )
{
static const gchar *thisfn = "nact_iproperties_tab_on_enabled_toggled";
- NAObjectItem *item;
+ FMAObjectItem *item;
gboolean enabled;
gboolean editable;
IPropertiesData *data;
@@ -354,11 +354,11 @@ on_enabled_toggled( GtkToggleButton *button, NactIPropertiesTab *instance )
MAIN_PROP_EDITABLE, &editable,
NULL );
- if( item && NA_IS_OBJECT_ITEM( item )){
+ if( item && FMA_IS_OBJECT_ITEM( item )){
enabled = gtk_toggle_button_get_active( button );
if( editable ){
- na_object_set_enabled( item, enabled );
+ fma_object_set_enabled( item, enabled );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item,
0 );
} else {
@@ -453,7 +453,7 @@ static void
on_description_changed( GtkTextBuffer *buffer, NactIPropertiesTab *instance )
{
static const gchar *thisfn = "nact_iproperties_tab_on_description_changed";
- NAObjectItem *item;
+ FMAObjectItem *item;
GtkTextIter start, end;
gchar *text;
@@ -468,7 +468,7 @@ on_description_changed( GtkTextBuffer *buffer, NactIPropertiesTab *instance )
gtk_text_buffer_get_start_iter( buffer, &start );
gtk_text_buffer_get_end_iter( buffer, &end );
text = gtk_text_buffer_get_text( buffer, &start, &end, TRUE );
- na_object_set_description( item, text );
+ fma_object_set_description( item, text );
g_signal_emit_by_name( G_OBJECT( instance ), MAIN_SIGNAL_ITEM_UPDATED, item, 0 );
}
}
@@ -476,7 +476,7 @@ on_description_changed( GtkTextBuffer *buffer, NactIPropertiesTab *instance )
static void
on_shortcut_clicked( GtkButton *button, NactIPropertiesTab *instance )
{
- NAObjectItem *item;
+ FMAObjectItem *item;
g_object_get(
G_OBJECT( instance ),
@@ -489,7 +489,7 @@ on_shortcut_clicked( GtkButton *button, NactIPropertiesTab *instance )
}
static void
-display_provider_name( NactIPropertiesTab *instance, NAObjectItem *item )
+display_provider_name( NactIPropertiesTab *instance, FMAObjectItem *item )
{
GtkWidget *label_widget;
gchar *label;
@@ -498,7 +498,7 @@ display_provider_name( NactIPropertiesTab *instance, NAObjectItem *item )
label_widget = na_gtk_utils_find_widget_by_name( GTK_CONTAINER( instance ), "ActionItemProvider" );
label = NULL;
if( item ){
- provider = na_object_get_provider( item );
+ provider = fma_object_get_provider( item );
if( provider ){
label = na_io_provider_get_name( provider );
}
diff --git a/src/nact/nact-ischemes-tab.c b/src/nact/nact-ischemes-tab.c
index f39cf41..d9d2269 100644
--- a/src/nact/nact-ischemes-tab.c
+++ b/src/nact/nact-ischemes-tab.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include "api/fma-core-utils.h"
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -252,13 +252,13 @@ on_add_from_defaults( GtkButton *button, NactISchemesTab *instance )
static GSList *
get_schemes( void *context )
{
- return( na_object_get_schemes( context ));
+ return( fma_object_get_schemes( context ));
}
static void
set_schemes( void *context, GSList *filters )
{
- na_object_set_schemes( context, filters );
+ fma_object_set_schemes( context, filters );
}
static void
diff --git a/src/nact/nact-main-tab.c b/src/nact/nact-main-tab.c
index ec53d30..44e6168 100644
--- a/src/nact/nact-main-tab.c
+++ b/src/nact/nact-main-tab.c
@@ -31,7 +31,7 @@
#include <config.h>
#endif
-#include "api/na-object-profile.h"
+#include "api/fma-object-profile.h"
#include "core/na-gtk-utils.h"
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 84ab59c..d54e181 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <stdlib.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "api/na-timeout.h"
#include "core/na-about.h"
@@ -80,7 +80,7 @@ struct _NactMainWindowPrivate {
* 'editable' property is set on selection change;
* This is the actual current writability status of the item at this time.
*/
- NAObjectItem *current_item;
+ FMAObjectItem *current_item;
gboolean editable;
guint reason;
@@ -99,7 +99,7 @@ struct _NactMainWindowPrivate {
* a) a profile is selected,
* b) an action is selected and it has exactly one profile.
*/
- NAObjectProfile *current_profile;
+ FMAObjectProfile *current_profile;
/**
* Current context.
@@ -178,7 +178,7 @@ static void on_tree_view_modified_status_changed( NactTreeView *treeview,
static void on_tree_view_selection_changed( NactTreeView *treeview, GList *selected_items,
NactMainWindow *window );
static void on_tab_item_updated( NactMainWindow *window, FMAIContext *context, guint data, void *empty
);
static void raz_selection_properties( NactMainWindow *window );
-static void setup_current_selection( NactMainWindow *window, NAObjectId *selected_row );
+static void setup_current_selection( NactMainWindow *window, FMAObjectId *selected_row );
static void setup_dialog_title( NactMainWindow *window );
static void setup_writability_status( NactMainWindow *window );
@@ -328,15 +328,15 @@ class_init( NactMainWindowClass *klass )
g_object_class_install_property( object_class, MAIN_PROP_ITEM_ID,
g_param_spec_pointer(
MAIN_PROP_ITEM,
- _( "Current NAObjectItem" ),
- _( "A pointer to the currently edited NAObjectItem, an action or a
menu" ),
+ _( "Current FMAObjectItem" ),
+ _( "A pointer to the currently edited FMAObjectItem, an action or a
menu" ),
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
g_object_class_install_property( object_class, MAIN_PROP_PROFILE_ID,
g_param_spec_pointer(
MAIN_PROP_PROFILE,
- _( "Current NAObjectProfile" ),
- _( "A pointer to the currently edited NAObjectProfile" ),
+ _( "Current FMAObjectProfile" ),
+ _( "A pointer to the currently edited FMAObjectProfile" ),
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
g_object_class_install_property( object_class, MAIN_PROP_CONTEXT_ID,
@@ -994,8 +994,8 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected_items, N
raz_selection_properties( window );
if( count == 1 ){
- g_return_if_fail( NA_IS_OBJECT_ID( selected_items->data ));
- setup_current_selection( window, NA_OBJECT_ID( selected_items->data ));
+ g_return_if_fail( FMA_IS_OBJECT_ID( selected_items->data ));
+ setup_current_selection( window, FMA_OBJECT_ID( selected_items->data ));
setup_writability_status( window );
}
@@ -1016,7 +1016,7 @@ on_tab_item_updated( NactMainWindow *window, FMAIContext *context, guint data, v
data, ( void * ) empty );
if( context ){
- na_object_check_status( context );
+ fma_object_check_status( context );
}
}
}
@@ -1038,27 +1038,27 @@ raz_selection_properties( NactMainWindow *window )
* only called when only one selected row
*/
static void
-setup_current_selection( NactMainWindow *window, NAObjectId *selected_row )
+setup_current_selection( NactMainWindow *window, FMAObjectId *selected_row )
{
guint nb_profiles;
GList *profiles;
- if( NA_IS_OBJECT_PROFILE( selected_row )){
- window->private->current_profile = NA_OBJECT_PROFILE( selected_row );
+ if( FMA_IS_OBJECT_PROFILE( selected_row )){
+ window->private->current_profile = FMA_OBJECT_PROFILE( selected_row );
window->private->current_context = FMA_ICONTEXT( selected_row );
- window->private->current_item = NA_OBJECT_ITEM( na_object_get_parent( selected_row ));
+ window->private->current_item = FMA_OBJECT_ITEM( fma_object_get_parent( selected_row ));
} else {
- g_return_if_fail( NA_IS_OBJECT_ITEM( selected_row ));
- window->private->current_item = NA_OBJECT_ITEM( selected_row );
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( selected_row ));
+ window->private->current_item = FMA_OBJECT_ITEM( selected_row );
window->private->current_context = FMA_ICONTEXT( selected_row );
- if( NA_IS_OBJECT_ACTION( selected_row )){
- nb_profiles = na_object_get_items_count( selected_row );
+ if( FMA_IS_OBJECT_ACTION( selected_row )){
+ nb_profiles = fma_object_get_items_count( selected_row );
if( nb_profiles == 1 ){
- profiles = na_object_get_items( selected_row );
- window->private->current_profile = NA_OBJECT_PROFILE( profiles->data );
+ profiles = fma_object_get_items( selected_row );
+ window->private->current_profile = FMA_OBJECT_PROFILE( profiles->data );
window->private->current_context = FMA_ICONTEXT( profiles->data );
}
}
@@ -1090,8 +1090,8 @@ setup_dialog_title( NactMainWindow *window )
title = nact_application_get_application_name( NACT_APPLICATION( application ));
if( priv->current_item ){
- label = na_object_get_label( priv->current_item );
- is_modified = na_object_is_modified( priv->current_item );
+ label = fma_object_get_label( priv->current_item );
+ is_modified = fma_object_is_modified( priv->current_item );
tmp = g_strdup_printf( "%s%s - %s", is_modified ? "*" : "", label, title );
g_free( label );
g_free( title );
@@ -1105,9 +1105,9 @@ setup_dialog_title( NactMainWindow *window )
static void
setup_writability_status( NactMainWindow *window )
{
- g_return_if_fail( NA_IS_OBJECT_ITEM( window->private->current_item ));
+ g_return_if_fail( FMA_IS_OBJECT_ITEM( window->private->current_item ));
- window->private->editable = na_object_is_finally_writable( window->private->current_item,
&window->private->reason );
+ window->private->editable = fma_object_is_finally_writable( window->private->current_item,
&window->private->reason );
nact_statusbar_set_locked( window->private->statusbar, !window->private->editable,
window->private->reason );
}
diff --git a/src/nact/nact-match-list.c b/src/nact/nact-match-list.c
index a51cc17..55ad627 100644
--- a/src/nact/nact-match-list.c
+++ b/src/nact/nact-match-list.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <libintl.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "api/fma-core-utils.h"
#include "base-keysyms.h"
diff --git a/src/nact/nact-menu-edit.c b/src/nact/nact-menu-edit.c
index 067fd48..e09d778 100644
--- a/src/nact/nact-menu-edit.c
+++ b/src/nact/nact-menu-edit.c
@@ -49,7 +49,7 @@
static GList *prepare_for_paste( NactMainWindow *window, sMenuData *sdata );
static GList *get_deletables( NAUpdater *updater, GList *tree, GSList **not_deletable );
static GSList *get_deletables_rec( NAUpdater *updater, GList *tree );
-static gchar *add_ndeletable_msg( const NAObjectItem *item, gint reason );
+static gchar *add_ndeletable_msg( const FMAObjectItem *item, gint reason );
static void update_clipboard_counters( NactMainWindow *window, sMenuData *sdata );
/**
@@ -73,9 +73,9 @@ nact_menu_edit_update_sensitivities( NactMainWindow *main_window )
gboolean paste_into_enabled;
gboolean duplicate_enabled;
gboolean delete_enabled;
- NAObject *parent_item;
- NAObject *selected_action;
- NAObject *selected_item;
+ FMAObject *parent_item;
+ FMAObject *selected_action;
+ FMAObject *selected_item;
gboolean is_clipboard_empty;
sdata = nact_menu_get_data( main_window );
@@ -139,21 +139,21 @@ nact_menu_edit_update_sensitivities( NactMainWindow *main_window )
if( sdata->clipboard_profiles ){
paste_into_enabled &= sdata->count_selected == 1;
if( paste_into_enabled ){
- selected_action = NA_OBJECT( sdata->selected_items->data );
- paste_into_enabled &= NA_IS_OBJECT_ACTION( selected_action );
+ selected_action = FMA_OBJECT( sdata->selected_items->data );
+ paste_into_enabled &= FMA_IS_OBJECT_ACTION( selected_action );
if( paste_into_enabled ){
- paste_into_enabled &= na_object_is_finally_writable( selected_action, NULL );
+ paste_into_enabled &= fma_object_is_finally_writable( selected_action, NULL );
}
}
} else {
paste_into_enabled &= sdata->has_writable_providers;
if( sdata->count_selected ){
- selected_item = NA_OBJECT( sdata->selected_items->data );
- paste_into_enabled &= NA_IS_OBJECT_MENU( selected_item );
+ selected_item = FMA_OBJECT( sdata->selected_items->data );
+ paste_into_enabled &= FMA_IS_OBJECT_MENU( selected_item );
if( paste_into_enabled ){
- parent_item = ( NAObject * ) na_object_get_parent( selected_item );
+ parent_item = ( FMAObject * ) fma_object_get_parent( selected_item );
paste_into_enabled &= parent_item
- ? na_object_is_finally_writable( parent_item, NULL )
+ ? fma_object_is_finally_writable( parent_item, NULL )
: sdata->is_level_zero_writable;
}
} else {
@@ -213,7 +213,7 @@ nact_menu_edit_cut( NactMainWindow *main_window )
g_return_if_fail( main_window && NACT_IS_MAIN_WINDOW( main_window ));
sdata = nact_menu_get_data( main_window );
- items = na_object_copyref_items( sdata->selected_items );
+ items = fma_object_copyref_items( sdata->selected_items );
ndeletables = NULL;
to_delete = get_deletables( sdata->updater, items, &ndeletables );
@@ -235,7 +235,7 @@ nact_menu_edit_cut( NactMainWindow *main_window )
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
}
- na_object_free_items( items );
+ fma_object_free_items( items );
}
/**
@@ -300,7 +300,7 @@ nact_menu_edit_paste( NactMainWindow *main_window )
if( items ){
view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( view ), items, NULL );
- na_object_free_items( items );
+ fma_object_free_items( items );
}
}
@@ -336,7 +336,7 @@ nact_menu_edit_paste_into( NactMainWindow *main_window )
if( items ){
view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_into( NACT_TREE_IEDITABLE( view ), items );
- na_object_free_items( items );
+ fma_object_free_items( items );
}
}
@@ -346,7 +346,7 @@ prepare_for_paste( NactMainWindow *window, sMenuData *sdata )
static const gchar *thisfn = "nact_menu_edit_prepare_for_paste";
GList *items, *it;
NactClipboard *clipboard;
- NAObjectAction *action;
+ FMAObjectAction *action;
gboolean relabel;
gboolean renumber;
@@ -358,16 +358,16 @@ prepare_for_paste( NactMainWindow *window, sMenuData *sdata )
*/
for( it = items ; it ; it = it->next ){
- if( NA_IS_OBJECT_PROFILE( it->data )){
+ if( FMA_IS_OBJECT_PROFILE( it->data )){
if( !action ){
g_object_get( G_OBJECT( window ), MAIN_PROP_ITEM, &action, NULL );
- g_return_val_if_fail( NA_IS_OBJECT_ACTION( action ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ACTION( action ), NULL );
}
}
- relabel = na_updater_should_pasted_be_relabeled( sdata->updater, NA_OBJECT( it->data ));
- na_object_prepare_for_paste( it->data, relabel, renumber, action );
- na_object_check_status( it->data );
+ relabel = na_updater_should_pasted_be_relabeled( sdata->updater, FMA_OBJECT( it->data ));
+ fma_object_prepare_for_paste( it->data, relabel, renumber, action );
+ fma_object_check_status( it->data );
}
g_debug( "%s: action=%p (%s)",
@@ -392,10 +392,10 @@ nact_menu_edit_duplicate( NactMainWindow *main_window )
{
static const gchar *thisfn = "nact_menu_edit_duplicate";
sMenuData *sdata;
- NAObjectAction *action;
+ FMAObjectAction *action;
GList *items, *it;
GList *dup;
- NAObject *obj;
+ FMAObject *obj;
gboolean relabel;
NactTreeView *view;
@@ -403,30 +403,30 @@ nact_menu_edit_duplicate( NactMainWindow *main_window )
g_return_if_fail( main_window && NACT_IS_MAIN_WINDOW( main_window ));
sdata = nact_menu_get_data( main_window );
- items = na_object_copyref_items( sdata->selected_items );
+ items = fma_object_copyref_items( sdata->selected_items );
for( it = items ; it ; it = it->next ){
- obj = NA_OBJECT( na_object_duplicate( it->data, DUPLICATE_REC ));
+ obj = FMA_OBJECT( fma_object_duplicate( it->data, DUPLICATE_REC ));
action = NULL;
/* duplicating a profile
* as we insert in sibling mode, the parent doesn't change
*/
- if( NA_IS_OBJECT_PROFILE( obj )){
- action = NA_OBJECT_ACTION( na_object_get_parent( it->data ));
+ if( FMA_IS_OBJECT_PROFILE( obj )){
+ action = FMA_OBJECT_ACTION( fma_object_get_parent( it->data ));
}
relabel = na_updater_should_pasted_be_relabeled( sdata->updater, obj );
- na_object_prepare_for_paste( obj, relabel, TRUE, action );
- na_object_set_origin( obj, NULL );
- na_object_check_status( obj );
+ fma_object_prepare_for_paste( obj, relabel, TRUE, action );
+ fma_object_set_origin( obj, NULL );
+ fma_object_check_status( obj );
dup = g_list_prepend( NULL, obj );
view = nact_main_window_get_items_view( NACT_MAIN_WINDOW( main_window ));
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( view ), dup, it->data );
- na_object_free_items( dup );
+ fma_object_free_items( dup );
}
- na_object_free_items( items );
+ fma_object_free_items( items );
}
/**
@@ -459,7 +459,7 @@ nact_menu_edit_delete( NactMainWindow *main_window )
g_return_if_fail( main_window && NACT_IS_MAIN_WINDOW( main_window ));
sdata = nact_menu_get_data( main_window );
- items = na_object_copyref_items( sdata->selected_items );
+ items = fma_object_copyref_items( sdata->selected_items );
ndeletables = NULL;
to_delete = get_deletables( sdata->updater, items, &ndeletables );
@@ -478,7 +478,7 @@ nact_menu_edit_delete( NactMainWindow *main_window )
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
}
- na_object_free_items( items );
+ fma_object_free_items( items );
}
static GList *
@@ -489,25 +489,25 @@ get_deletables( NAUpdater *updater, GList *selected, GSList **ndeletables )
GList *subitems;
GSList *sub_deletables;
guint reason;
- NAObjectItem *item;
+ FMAObjectItem *item;
to_delete = NULL;
for( it = selected ; it ; it = it->next ){
- if( NA_IS_OBJECT_PROFILE( it->data )){
- item = na_object_get_parent( it->data );
+ if( FMA_IS_OBJECT_PROFILE( it->data )){
+ item = fma_object_get_parent( it->data );
} else {
- item = NA_OBJECT_ITEM( it->data );
+ item = FMA_OBJECT_ITEM( it->data );
}
- if( !na_object_is_finally_writable( item, &reason )){
+ if( !fma_object_is_finally_writable( item, &reason )){
*ndeletables = g_slist_prepend(
- *ndeletables, add_ndeletable_msg( NA_OBJECT_ITEM( it->data ), reason
));
+ *ndeletables, add_ndeletable_msg( FMA_OBJECT_ITEM( it->data ), reason
));
continue;
}
- if( NA_IS_OBJECT_MENU( it->data )){
- subitems = na_object_get_items( it->data );
+ if( FMA_IS_OBJECT_MENU( it->data )){
+ subitems = fma_object_get_items( it->data );
sub_deletables = get_deletables_rec( updater, subitems );
if( sub_deletables ){
@@ -516,7 +516,7 @@ get_deletables( NAUpdater *updater, GList *selected, GSList **ndeletables )
}
}
- to_delete = g_list_prepend( to_delete, na_object_ref( it->data ));
+ to_delete = g_list_prepend( to_delete, fma_object_ref( it->data ));
}
return( to_delete );
@@ -533,14 +533,14 @@ get_deletables_rec( NAUpdater *updater, GList *tree )
msgs = NULL;
for( it = tree ; it ; it = it->next ){
- if( !na_object_is_finally_writable( it->data, &reason )){
+ if( !fma_object_is_finally_writable( it->data, &reason )){
msgs = g_slist_prepend(
- msgs, add_ndeletable_msg( NA_OBJECT_ITEM( it->data ), reason ));
+ msgs, add_ndeletable_msg( FMA_OBJECT_ITEM( it->data ), reason ));
continue;
}
- if( NA_IS_OBJECT_MENU( it->data )){
- subitems = na_object_get_items( it->data );
+ if( FMA_IS_OBJECT_MENU( it->data )){
+ subitems = fma_object_get_items( it->data );
msgs = g_slist_concat( msgs, get_deletables_rec( updater, subitems ));
}
}
@@ -549,13 +549,13 @@ get_deletables_rec( NAUpdater *updater, GList *tree )
}
static gchar *
-add_ndeletable_msg( const NAObjectItem *item, gint reason )
+add_ndeletable_msg( const FMAObjectItem *item, gint reason )
{
gchar *msg;
gchar *label;
gchar *reasstr;
- label = na_object_get_label( item );
+ label = fma_object_get_label( item );
reasstr = na_io_provider_get_readonly_tooltip( reason );
msg = g_strdup_printf( "%s: %s", label, reasstr );
diff --git a/src/nact/nact-menu-file.c b/src/nact/nact-menu-file.c
index bbbcbfd..03c6ac5 100644
--- a/src/nact/nact-menu-file.c
+++ b/src/nact/nact-menu-file.c
@@ -56,7 +56,7 @@ static gchar *st_save_warning = N_( "Some items may not have been saved" );
static gchar *st_level_zero_write = N_( "Unable to rewrite the level-zero items list" );
static gchar *st_delete_error = N_( "Some items have not been deleted" );
-static gboolean save_item( NactMainWindow *window, NAUpdater *updater, NAObjectItem *item, GSList **messages
);
+static gboolean save_item( NactMainWindow *window, NAUpdater *updater, FMAObjectItem *item, GSList
**messages );
static void install_autosave( NactMainWindow *main_window );
static void on_autosave_prefs_changed( const gchar *group, const gchar *key, gconstpointer new_value,
gpointer user_data );
static void on_autosave_prefs_timeout( NactMainWindow *main_window );
@@ -125,18 +125,18 @@ void
nact_menu_file_new_menu( NactMainWindow *main_window )
{
sMenuData *sdata;
- NAObjectMenu *menu;
+ FMAObjectMenu *menu;
NactTreeView *items_view;
GList *items;
sdata = nact_menu_get_data( main_window );
- menu = na_object_menu_new_with_defaults();
- na_object_check_status( menu );
- na_updater_check_item_writability_status( sdata->updater, NA_OBJECT_ITEM( menu ));
+ menu = fma_object_menu_new_with_defaults();
+ fma_object_check_status( menu );
+ na_updater_check_item_writability_status( sdata->updater, FMA_OBJECT_ITEM( menu ));
items = g_list_prepend( NULL, menu );
items_view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
- na_object_free_items( items );
+ fma_object_free_items( items );
}
/**
@@ -149,18 +149,18 @@ void
nact_menu_file_new_action( NactMainWindow *main_window )
{
sMenuData *sdata;
- NAObjectAction *action;
+ FMAObjectAction *action;
NactTreeView *items_view;
GList *items;
sdata = nact_menu_get_data( main_window );
- action = na_object_action_new_with_defaults();
- na_object_check_status( action );
- na_updater_check_item_writability_status( sdata->updater, NA_OBJECT_ITEM( action ));
+ action = fma_object_action_new_with_defaults();
+ fma_object_check_status( action );
+ na_updater_check_item_writability_status( sdata->updater, FMA_OBJECT_ITEM( action ));
items = g_list_prepend( NULL, action );
items_view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
- na_object_free_items( items );
+ fma_object_free_items( items );
}
/**
@@ -172,8 +172,8 @@ nact_menu_file_new_action( NactMainWindow *main_window )
void
nact_menu_file_new_profile( NactMainWindow *main_window )
{
- NAObjectAction *action;
- NAObjectProfile *profile;
+ FMAObjectAction *action;
+ FMAObjectProfile *profile;
NactTreeView *items_view;
GList *items;
@@ -182,18 +182,18 @@ nact_menu_file_new_profile( NactMainWindow *main_window )
MAIN_PROP_ITEM, &action,
NULL );
- profile = na_object_profile_new_with_defaults();
- na_object_attach_profile( action, profile );
+ profile = fma_object_profile_new_with_defaults();
+ fma_object_attach_profile( action, profile );
- na_object_set_label( profile, _( "New profile" ));
- na_object_set_new_id( profile, action );
+ fma_object_set_label( profile, _( "New profile" ));
+ fma_object_set_new_id( profile, action );
- na_object_check_status( profile );
+ fma_object_check_status( profile );
items = g_list_prepend( NULL, profile );
items_view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
- na_object_free_items( items );
+ fma_object_free_items( items );
}
/**
@@ -233,7 +233,7 @@ nact_menu_file_save_items( NactMainWindow *window )
NactTreeView *items_view;
GList *items, *it;
GList *new_pivot;
- NAObjectItem *duplicate;
+ FMAObjectItem *duplicate;
GSList *messages;
gchar *msg;
@@ -246,7 +246,7 @@ nact_menu_file_save_items( NactMainWindow *window )
*/
items_view = nact_main_window_get_items_view( window );
items = nact_tree_view_get_items( items_view );
- na_object_dump_tree( items );
+ fma_object_dump_tree( items );
messages = NULL;
if( nact_tree_ieditable_is_level_zero_modified( NACT_TREE_IEDITABLE( items_view ))){
@@ -282,7 +282,7 @@ nact_menu_file_save_items( NactMainWindow *window )
messages = NULL;
} else {
- na_object_free_items( items );
+ fma_object_free_items( items );
items = nact_tree_view_get_items( items_view );
}
@@ -294,10 +294,10 @@ nact_menu_file_save_items( NactMainWindow *window )
new_pivot = NULL;
for( it = items ; it ; it = it->next ){
- save_item( window, sdata->updater, NA_OBJECT_ITEM( it->data ), &messages );
- duplicate = NA_OBJECT_ITEM( na_object_duplicate( it->data, DUPLICATE_REC ));
- na_object_reset_origin( it->data, duplicate );
- na_object_check_status( it->data );
+ save_item( window, sdata->updater, FMA_OBJECT_ITEM( it->data ), &messages );
+ duplicate = FMA_OBJECT_ITEM( fma_object_duplicate( it->data, DUPLICATE_REC ));
+ fma_object_reset_origin( it->data, duplicate );
+ fma_object_check_status( it->data );
new_pivot = g_list_prepend( new_pivot, duplicate );
}
@@ -310,16 +310,16 @@ nact_menu_file_save_items( NactMainWindow *window )
}
na_pivot_set_new_items( NA_PIVOT( sdata->updater ), g_list_reverse( new_pivot ));
- na_object_free_items( items );
+ fma_object_free_items( items );
nact_main_window_block_reload( window );
g_signal_emit_by_name( items_view, TREE_SIGNAL_MODIFIED_STATUS_CHANGED, FALSE );
}
/*
- * iterates here on each and every NAObjectItem row stored in the tree
+ * iterates here on each and every FMAObjectItem row stored in the tree
*/
static gboolean
-save_item( NactMainWindow *window, NAUpdater *updater, NAObjectItem *item, GSList **messages )
+save_item( NactMainWindow *window, NAUpdater *updater, FMAObjectItem *item, GSList **messages )
{
static const gchar *thisfn = "nact_menu_file_save_item";
gboolean ret;
@@ -331,21 +331,21 @@ save_item( NactMainWindow *window, NAUpdater *updater, NAObjectItem *item, GSLis
g_return_val_if_fail( NACT_IS_MAIN_WINDOW( window ), FALSE );
g_return_val_if_fail( NA_IS_UPDATER( updater ), FALSE );
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( item ), FALSE );
ret = TRUE;
- if( NA_IS_OBJECT_MENU( item )){
- subitems = na_object_get_items( item );
+ if( FMA_IS_OBJECT_MENU( item )){
+ subitems = fma_object_get_items( item );
for( it = subitems ; it ; it = it->next ){
- ret &= save_item( window, updater, NA_OBJECT_ITEM( it->data ), messages );
+ ret &= save_item( window, updater, FMA_OBJECT_ITEM( it->data ), messages );
}
}
- provider_before = na_object_get_provider( item );
+ provider_before = fma_object_get_provider( item );
- if( na_object_is_modified( item )){
- label = na_object_get_label( item );
+ if( fma_object_is_modified( item )){
+ label = fma_object_get_label( item );
g_debug( "%s: saving %p (%s) '%s'", thisfn, ( void * ) item, G_OBJECT_TYPE_NAME( item ),
label );
g_free( label );
@@ -353,11 +353,11 @@ save_item( NactMainWindow *window, NAUpdater *updater, NAObjectItem *item, GSLis
ret = ( save_ret == FMA_IIO_PROVIDER_CODE_OK );
if( ret ){
- if( NA_IS_OBJECT_ACTION( item )){
- na_object_reset_last_allocated( item );
+ if( FMA_IS_OBJECT_ACTION( item )){
+ fma_object_reset_last_allocated( item );
}
- provider_after = na_object_get_provider( item );
+ provider_after = fma_object_get_provider( item );
if( provider_after != provider_before ){
g_signal_emit_by_name( window, MAIN_SIGNAL_ITEM_UPDATED, item,
MAIN_DATA_PROVIDER );
}
diff --git a/src/nact/nact-menu.c b/src/nact/nact-menu.c
index 50baed8..44420f9 100644
--- a/src/nact/nact-menu.c
+++ b/src/nact/nact-menu.c
@@ -499,7 +499,7 @@ on_tree_view_focus_out( NactTreeView *treeview, NactMainWindow *window )
}
/*
- * the count of modified NAObjectItem has changed
+ * the count of modified FMAObjectItem has changed
*/
static void
on_tree_view_modified_status_changed( NactTreeView *treeview, gboolean is_modified, NactMainWindow *window )
@@ -533,9 +533,9 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
{
static const gchar *thisfn = "nact_menu_on_tree_view_selection_changed";
sMenuData *sdata;
- NAObject *first;
- NAObject *selected_action;
- NAObject *row, *parent;
+ FMAObject *first;
+ FMAObject *selected_action;
+ FMAObject *row, *parent;
GList *is;
g_debug( "%s: treeview=%p, selected_items=%p (count=%d), window=%p",
@@ -549,7 +549,7 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
sdata->count_selected = g_list_length( selected );
if( selected ){
- na_object_item_count_items( selected, &sdata->selected_menus, &sdata->selected_actions,
&sdata->selected_profiles, FALSE );
+ fma_object_item_count_items( selected, &sdata->selected_menus, &sdata->selected_actions,
&sdata->selected_profiles, FALSE );
g_debug( "%s: selected_menus=%d, selected_actions=%d, selected_profiles=%d",
thisfn,
sdata->selected_menus, sdata->selected_actions, sdata->selected_profiles );
@@ -568,14 +568,14 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
*/
first = NULL;
if( selected ){
- first = ( NAObject *) selected->data;
- if( NA_IS_OBJECT_PROFILE( first )){
- first = NA_OBJECT( na_object_get_parent( first ));
+ first = ( FMAObject *) selected->data;
+ if( FMA_IS_OBJECT_PROFILE( first )){
+ first = FMA_OBJECT( fma_object_get_parent( first ));
}
- first = ( NAObject * ) na_object_get_parent( first );
+ first = ( FMAObject * ) fma_object_get_parent( first );
}
if( first ){
- sdata->is_parent_writable = na_object_is_finally_writable( first, NULL );
+ sdata->is_parent_writable = fma_object_is_finally_writable( first, NULL );
g_debug( "%s: parent of first selected is not null: is_parent_writable=%s",
thisfn, sdata->is_parent_writable ? "True":"False" );
} else {
@@ -592,20 +592,20 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
selected_action = NULL;
for( is = selected ; is ; is = is->next ){
- if( NA_IS_OBJECT_MENU( is->data )){
+ if( FMA_IS_OBJECT_MENU( is->data )){
sdata->enable_new_profile = FALSE;
break;
- } else if( NA_IS_OBJECT_ACTION( is->data )){
+ } else if( FMA_IS_OBJECT_ACTION( is->data )){
if( !selected_action ){
- selected_action = NA_OBJECT( is->data );
+ selected_action = FMA_OBJECT( is->data );
} else {
sdata->enable_new_profile = FALSE;
break;
}
- } else if( NA_IS_OBJECT_PROFILE( is->data )){
- first = NA_OBJECT( na_object_get_parent( is->data ));
+ } else if( FMA_IS_OBJECT_PROFILE( is->data )){
+ first = FMA_OBJECT( fma_object_get_parent( is->data ));
if( !selected_action ){
selected_action = first;
} else if( selected_action != first ){
@@ -615,7 +615,7 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
}
}
if( selected_action ){
- sdata->is_action_writable = na_object_is_finally_writable( selected_action, NULL );
+ sdata->is_action_writable = fma_object_is_finally_writable( selected_action, NULL );
} else {
sdata->enable_new_profile = FALSE;
}
@@ -629,18 +629,18 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected, NactMai
sdata->are_parents_writable = TRUE;
sdata->are_items_writable = TRUE;
for( is = selected ; is ; is = is->next ){
- row = ( NAObject * ) is->data;
- if( NA_IS_OBJECT_PROFILE( row )){
- row = NA_OBJECT( na_object_get_parent( row ));
+ row = ( FMAObject * ) is->data;
+ if( FMA_IS_OBJECT_PROFILE( row )){
+ row = FMA_OBJECT( fma_object_get_parent( row ));
}
- gchar *label = na_object_get_label( row );
- gboolean writable = na_object_is_finally_writable( row, NULL );
+ gchar *label = fma_object_get_label( row );
+ gboolean writable = fma_object_is_finally_writable( row, NULL );
g_debug( "%s: label=%s, writable=%s", thisfn, label, writable ? "True":"False" );
g_free( label );
sdata->are_items_writable &= writable;
- parent = ( NAObject * ) na_object_get_parent( row );
+ parent = ( FMAObject * ) fma_object_get_parent( row );
if( parent ){
- sdata->are_parents_writable &= na_object_is_finally_writable( parent, NULL );
+ sdata->are_parents_writable &= fma_object_is_finally_writable( parent, NULL );
} else {
sdata->are_parents_writable &= sdata->is_level_zero_writable;
}
diff --git a/src/nact/nact-menu.h b/src/nact/nact-menu.h
index 5b5d3d0..de37c5b 100644
--- a/src/nact/nact-menu.h
+++ b/src/nact/nact-menu.h
@@ -68,7 +68,7 @@ typedef struct {
gboolean are_parents_writable; /* duplicate */
gboolean are_items_writable; /* cut/delete */
- /* set when the count of modified or deleted NAObjectItem changes
+ /* set when the count of modified or deleted FMAObjectItem changes
* or when the level zero is changed
*/
gboolean is_tree_modified;
diff --git a/src/nact/nact-providers-list.c b/src/nact/nact-providers-list.c
index 9a8b296..74bf341 100644
--- a/src/nact/nact-providers-list.c
+++ b/src/nact/nact-providers-list.c
@@ -35,7 +35,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-gconf-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <core/na-io-provider.h>
diff --git a/src/nact/nact-schemes-list.c b/src/nact/nact-schemes-list.c
index ea3fb81..6fc0842 100644
--- a/src/nact/nact-schemes-list.c
+++ b/src/nact/nact-schemes-list.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include "base-keysyms.h"
#include "nact-application.h"
@@ -117,7 +117,7 @@ static SchemesListData *get_schemes_list_data( GtkTreeView *treeview );
* Associates the SchemesListData structure to the widget.
*
* The default list of schemes is displayed in two cases:
- * - when adding a scheme to a NAObjectItem (cf. NactISchemesTab)
+ * - when adding a scheme to a FMAObjectItem (cf. NactISchemesTab)
* so the schemes list is opened for selection
*
* we have chosen to not allow default schemes list edition in this mode
diff --git a/src/nact/nact-tree-ieditable.c b/src/nact/nact-tree-ieditable.c
index 964e755..3c723d0 100644
--- a/src/nact/nact-tree-ieditable.c
+++ b/src/nact/nact-tree-ieditable.c
@@ -32,7 +32,7 @@
#endif
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <core/na-factory-object.h>
#include <core/na-updater.h>
@@ -76,11 +76,11 @@ static void interface_base_finalize( NactTreeIEditableInterface *klass
static gboolean on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactTreeIEditable
*instance );
static void on_label_edited( GtkCellRendererText *renderer, const gchar *path_str, const gchar
*text, NactTreeView *items_view );
static void on_tree_view_selection_changed( NactTreeIEditable *view, GList *selected_items, void
*empty );
-static void on_object_modified_status_changed( NactTreeIEditable *view, NAObject *object, gboolean
new_status, void *empty );
-static void on_object_valid_status_changed( NactTreeIEditable *view, NAObject *object, gboolean
new_status, void *empty );
+static void on_object_modified_status_changed( NactTreeIEditable *view, FMAObject *object,
gboolean new_status, void *empty );
+static void on_object_valid_status_changed( NactTreeIEditable *view, FMAObject *object, gboolean
new_status, void *empty );
static void on_tree_view_level_zero_changed( NactTreeIEditable *view, gboolean is_modified, void
*empty );
static void on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modified,
void *empty );
-static void add_to_deleted_rec( IEditableData *ied, NAObject *object );
+static void add_to_deleted_rec( IEditableData *ied, FMAObject *object );
static void decrement_counters( NactTreeIEditable *view, IEditableData *ialid, GList *items );
static GtkTreePath *do_insert_before( IEditableData *ied, GList *items, GtkTreePath *insert_path );
static GtkTreePath *do_insert_into( IEditableData *ied, GList *items, GtkTreePath *insert_path );
@@ -247,7 +247,7 @@ nact_tree_ieditable_terminate( NactTreeIEditable *instance )
ied = get_instance_data( instance );
- na_object_free_items( ied->deleted );
+ fma_object_free_items( ied->deleted );
g_signal_handler_disconnect( instance, ied->modified_handler_id );
g_signal_handler_disconnect( instance, ied->valid_handler_id );
@@ -280,14 +280,14 @@ static void
on_label_edited( GtkCellRendererText *renderer, const gchar *path_str, const gchar *text, NactTreeView
*items_view )
{
IEditableData *ied;
- NAObject *object;
+ FMAObject *object;
GtkTreePath *path;
if( nact_tree_view_are_notify_allowed( items_view )){
ied = ( IEditableData * ) g_object_get_data( G_OBJECT( items_view ), VIEW_DATA_IEDITABLE );
path = gtk_tree_path_new_from_string( path_str );
object = nact_tree_model_object_at_path( ied->model, path );
- na_object_set_label( object, text );
+ fma_object_set_label( object, text );
g_signal_emit_by_name( ied->main_window, MAIN_SIGNAL_ITEM_UPDATED, object );
}
@@ -297,7 +297,7 @@ static void
on_tree_view_selection_changed( NactTreeIEditable *instance, GList *selected_items, void *empty )
{
IEditableData *ied;
- NAObject *object;
+ FMAObject *object;
gboolean object_editable;
GtkTreeViewColumn *column;
GList *renderers;
@@ -305,7 +305,7 @@ on_tree_view_selection_changed( NactTreeIEditable *instance, GList *selected_ite
ied = ( IEditableData * ) g_object_get_data( G_OBJECT( instance ), VIEW_DATA_IEDITABLE );
g_object_get( ied->main_window, MAIN_PROP_ITEM, &object, MAIN_PROP_EDITABLE, &object_editable, NULL );
- editable = NA_IS_OBJECT( object ) && object_editable;
+ editable = FMA_IS_OBJECT( object ) && object_editable;
column = gtk_tree_view_get_column( ied->treeview, TREE_COLUMN_LABEL );
renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
g_object_set( G_OBJECT( renderers->data ), "editable", editable, "editable-set", TRUE, NULL );
@@ -316,7 +316,7 @@ on_tree_view_selection_changed( NactTreeIEditable *instance, GList *selected_ite
* - refresh the display
*/
static void
-on_object_modified_status_changed( NactTreeIEditable *instance, NAObject *object, gboolean is_modified, void
*empty )
+on_object_modified_status_changed( NactTreeIEditable *instance, FMAObject *object, gboolean is_modified,
void *empty )
{
static const gchar *thisfn = "nact_tree_ieditable_on_object_modified_status_changed";
IEditableData *ied;
@@ -331,7 +331,7 @@ on_object_modified_status_changed( NactTreeIEditable *instance, NAObject *object
prev_status = get_modification_status( ied );
gtk_tree_model_filter_refilter( GTK_TREE_MODEL_FILTER( ied->model ));
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
if( is_modified ){
ied->count_modified += 1;
} else {
@@ -352,7 +352,7 @@ on_object_modified_status_changed( NactTreeIEditable *instance, NAObject *object
* - refresh the display
*/
static void
-on_object_valid_status_changed( NactTreeIEditable *instance, NAObject *object, gboolean new_status, void
*empty )
+on_object_valid_status_changed( NactTreeIEditable *instance, FMAObject *object, gboolean new_status, void
*empty )
{
static const gchar *thisfn = "nact_tree_ieditable_on_object_valid_status_changed";
IEditableData *ied;
@@ -396,7 +396,7 @@ on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modif
if( !is_modified ){
ied = get_instance_data( view );
ied->count_modified = 0;
- ied->deleted = na_object_free_items( ied->deleted );
+ ied->deleted = fma_object_free_items( ied->deleted );
ied->level_zero_changed = FALSE;
}
}
@@ -404,7 +404,7 @@ on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modif
/**
* nact_tree_ieditable_delete:
* @instance: this #NactTreeIEditable instance.
- * @list: list of #NAObject to be deleted.
+ * @list: list of #FMAObject to be deleted.
* @ope: whether the objects are actually to be deleted, or just moved
* to another path of the tree.
*
@@ -413,10 +413,10 @@ on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modif
* If the items are to be actually deleted, then this function takes care
* of repositionning a new selection if possible, and refilter the display
* model.
- * Deleted NAObjectItems are added to the 'deleted' list attached to the
+ * Deleted FMAObjectItems are added to the 'deleted' list attached to the
* view, so that they will be actually deleted from the storage subsystem
* on save.
- * Deleted NAObjectProfiles are not added to the list, because the deletion
+ * Deleted FMAObjectProfiles are not added to the list, because the deletion
* will be recorded when saving the action.
*
* If the items are to be actually moved to another path of the tree, then
@@ -430,7 +430,7 @@ nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEdit
gboolean prev_status, status;
GtkTreePath *path;
GList *it;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
@@ -452,10 +452,10 @@ nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEdit
/* check the status of the parent of the deleted object
* so potentially update the modification status
*/
- parent = na_object_get_parent( it->data );
- path = nact_tree_model_delete( ied->model, NA_OBJECT( it->data ));
+ parent = fma_object_get_parent( it->data );
+ path = nact_tree_model_delete( ied->model, FMA_OBJECT( it->data ));
if( parent ){
- na_object_check_status( parent );
+ fma_object_check_status( parent );
} else {
check_level_zero_status( instance );
}
@@ -464,7 +464,7 @@ nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEdit
* incrementing the 'modified' count if the deleted item was not yet modified
*/
if( ope == TREE_OPE_DELETE ){
- add_to_deleted_rec( ied, NA_OBJECT( it->data ));
+ add_to_deleted_rec( ied, FMA_OBJECT( it->data ));
}
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
@@ -494,7 +494,7 @@ nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEdit
* @list: list of deleted objects.
* @object: the object to be added from the list.
*
- * Recursively adds to the 'deleted' list the NAObjectItem object currently being deleted.
+ * Recursively adds to the 'deleted' list the FMAObjectItem object currently being deleted.
*
* Increments the 'modified' count with the deleted items which were not modified.
*
@@ -502,26 +502,26 @@ nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEdit
* from the backend, i.e. those who have a non-null provider.
*/
static void
-add_to_deleted_rec( IEditableData *ied, NAObject *object )
+add_to_deleted_rec( IEditableData *ied, FMAObject *object )
{
GList *subitems, *it;
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
if( !g_list_find( ied->deleted, object )){
ied->deleted = g_list_prepend( ied->deleted, object );
- if( na_object_is_modified( object )){
+ if( fma_object_is_modified( object )){
ied->count_modified -= 1;
}
- if( na_object_get_provider( object )){
+ if( fma_object_get_provider( object )){
ied->count_deleted += 1;
}
}
- if( NA_IS_OBJECT_MENU( object )){
- subitems = na_object_get_items( object );
+ if( FMA_IS_OBJECT_MENU( object )){
+ subitems = fma_object_get_items( object );
for( it = subitems ; it ; it = it->next ){
add_to_deleted_rec( ied, it->data );
}
@@ -541,7 +541,7 @@ decrement_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
g_debug( "%s: view=%p, ied=%p, items=%p (count=%u)",
thisfn, ( void * ) view, ( void * ) ied, ( void * ) items, g_list_length( items ));
- na_object_count_items( items, &menus, &actions, &profiles );
+ fma_object_count_items( items, &menus, &actions, &profiles );
menus *= -1;
actions *= -1;
profiles *= -1;
@@ -570,7 +570,7 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
gboolean delete_ok;
IEditableData *ied;
GList *it;
- NAObjectItem *item;
+ FMAObjectItem *item;
GList *not_deleted;
g_return_val_if_fail( NACT_IS_TREE_IEDITABLE( instance ), TRUE );
@@ -580,17 +580,17 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
not_deleted = NULL;
for( it = ied->deleted ; it ; it = it->next ){
- item = NA_OBJECT_ITEM( it->data );
+ item = FMA_OBJECT_ITEM( it->data );
g_debug( "%s: item=%p (%s)", thisfn, ( void * ) item, G_OBJECT_TYPE_NAME( item ));
- na_object_dump_norec( item );
+ fma_object_dump_norec( item );
if( na_updater_delete_item( ied->updater, item, messages ) != FMA_IIO_PROVIDER_CODE_OK ){
- not_deleted = g_list_prepend( not_deleted, na_object_ref( item ));
+ not_deleted = g_list_prepend( not_deleted, fma_object_ref( item ));
delete_ok = FALSE;
}
}
- ied->deleted = na_object_free_items( ied->deleted );
+ ied->deleted = fma_object_free_items( ied->deleted );
/* items that we cannot delete are reinserted in the tree view
* in the state they were when they were deleted
@@ -598,7 +598,7 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
*/
if( not_deleted ){
nact_tree_ieditable_insert_items( instance, not_deleted, NULL );
- na_object_free_items( not_deleted );
+ fma_object_free_items( not_deleted );
}
return( delete_ok );
@@ -608,7 +608,7 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
* nact_tree_ieditable_get_deleted:
* @instance: this #NactTreeIEditable *instance.
*
- * Returns: a copy of the 'deleted' list, which should be na_object_free_items()
+ * Returns: a copy of the 'deleted' list, which should be fma_object_free_items()
* by the caller.
*/
GList *
@@ -620,7 +620,7 @@ nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
g_return_val_if_fail( NACT_IS_TREE_IEDITABLE( instance ), NULL );
ied = get_instance_data( instance );
- deleted = na_object_copyref_items( ied->deleted );
+ deleted = fma_object_copyref_items( ied->deleted );
return( deleted );
}
@@ -629,7 +629,7 @@ nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
* nact_tree_ieditable_insert_items:
* @instance: this #NactTreeIEditable instance.
* @items: a list of items to be inserted (e.g. from a paste).
- * @sibling: the #NAObject besides which the insertion should occurs;
+ * @sibling: the #FMAObject besides which the insertion should occurs;
* this is mainly used for inserting duplicated items besides each of
* original ones; may be %NULL.
*
@@ -642,19 +642,19 @@ nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
* If the @items list contains profiles, they can only be inserted
* into an action, or before another profile.
*
- * If new item is a #NAObjectMenu or a #NAObjectAction, it will be inserted
+ * If new item is a #FMAObjectMenu or a #FMAObjectAction, it will be inserted
* before the current action or menu.
*
* This function takes care of repositionning a new selection (if possible)
* on the lastly inserted item, and to refresh the display.
*/
void
-nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, NAObject *sibling )
+nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, FMAObject *sibling )
{
static const gchar *thisfn = "nact_tree_ieditable_insert_items";
IEditableData *ied;
GtkTreePath *insert_path;
- NAObject *object, *parent;
+ FMAObject *object, *parent;
g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
g_return_if_fail( items );
@@ -675,16 +675,16 @@ nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, NAO
/* as a particular case, insert a new profile _into_ current action
*/
- if( NA_IS_OBJECT_ACTION( object ) && NA_IS_OBJECT_PROFILE( items->data )){
+ if( FMA_IS_OBJECT_ACTION( object ) && FMA_IS_OBJECT_PROFILE( items->data )){
nact_tree_ieditable_insert_into( instance, items );
gtk_tree_path_free( insert_path );
return;
}
- /* insert a new NAObjectItem before current NAObjectItem
+ /* insert a new FMAObjectItem before current FMAObjectItem
*/
- if( NA_IS_OBJECT_PROFILE( object ) && NA_IS_OBJECT_ITEM( items->data )){
- parent = ( NAObject * ) na_object_get_parent( object );
+ if( FMA_IS_OBJECT_PROFILE( object ) && FMA_IS_OBJECT_ITEM( items->data )){
+ parent = ( FMAObject * ) fma_object_get_parent( object );
gtk_tree_path_free( insert_path );
insert_path = nact_tree_model_object_to_path( ied->model, parent );
}
@@ -712,7 +712,7 @@ nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, G
IEditableData *ied;
GtkTreePath *actual_path;
gboolean prev_status, status;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
GList *it;
g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
@@ -726,12 +726,12 @@ nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, G
actual_path = do_insert_before( ied, items, insert_path );
- parent = na_object_get_parent( items->data );
+ parent = fma_object_get_parent( items->data );
if( parent ){
- na_object_check_status( parent );
+ fma_object_check_status( parent );
} else {
for( it = items ; it ; it = it->next ){
- na_object_check_status( it->data );
+ fma_object_check_status( it->data );
}
g_signal_emit_by_name( instance, TREE_SIGNAL_LEVEL_ZERO_CHANGED, TRUE );
}
@@ -763,7 +763,7 @@ nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, G
* If the @items list contains only profiles, they can only be inserted
* into an action, and the profiles will eventually be renumbered.
*
- * If new item is a #NAObjectMenu or a #NAObjectAction, it will be inserted
+ * If new item is a #FMAObjectMenu or a #FMAObjectAction, it will be inserted
* as first children of the current menu.
*
* This function takes care of repositionning a new selection as the
@@ -776,7 +776,7 @@ nact_tree_ieditable_insert_into( NactTreeIEditable *instance, GList *items )
IEditableData *ied;
GtkTreePath *insert_path;
GtkTreePath *new_path;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
@@ -788,8 +788,8 @@ nact_tree_ieditable_insert_into( NactTreeIEditable *instance, GList *items )
new_path = do_insert_into( ied, items, insert_path );
- parent = na_object_get_parent( items->data );
- na_object_check_status( parent );
+ parent = fma_object_get_parent( items->data );
+ fma_object_check_status( parent );
/* post insertion
*/
@@ -828,15 +828,15 @@ do_insert_before( IEditableData *ied, GList *items, GtkTreePath *asked_path )
} else {
path = gtk_tree_path_copy( asked_path );
}
- actual_path = nact_tree_model_insert_before( ied->model, NA_OBJECT( it->data ), path );
+ actual_path = nact_tree_model_insert_before( ied->model, FMA_OBJECT( it->data ), path );
gtk_tree_path_free( path );
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
( void * ) it->data, G_OBJECT_TYPE_NAME( it->data ), G_OBJECT( it->data
)->ref_count );
/* recursively insert subitems
*/
- if( NA_IS_OBJECT_ITEM( it->data )){
- path = do_insert_into( ied, na_object_get_items( it->data ), actual_path );
+ if( FMA_IS_OBJECT_ITEM( it->data )){
+ path = do_insert_into( ied, fma_object_get_items( it->data ), actual_path );
gtk_tree_path_free( path );
}
}
@@ -873,11 +873,11 @@ do_insert_into( IEditableData *ied, GList *items, GtkTreePath *asked_path )
/* insert the last child into the wished path
* and recursively all its children
*/
- actual_path = nact_tree_model_insert_into( ied->model, NA_OBJECT( last->data ), asked_path );
+ actual_path = nact_tree_model_insert_into( ied->model, FMA_OBJECT( last->data ), asked_path );
gtk_tree_view_expand_to_path( ied->treeview, actual_path );
- if( NA_IS_OBJECT_ITEM( last->data )){
- insertion_path = do_insert_into( ied, na_object_get_items( last->data ), actual_path
);
+ if( FMA_IS_OBJECT_ITEM( last->data )){
+ insertion_path = do_insert_into( ied, fma_object_get_items( last->data ), actual_path
);
gtk_tree_path_free( insertion_path );
}
@@ -906,7 +906,7 @@ increment_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
g_debug( "%s: view=%p, ied=%p, items=%p (count=%d)",
thisfn, ( void * ) view, ( void * ) ied, ( void * ) items, items ? g_list_length(
items ) : 0 );
- na_object_count_items( items, &menus, &actions, &profiles );
+ fma_object_count_items( items, &menus, &actions, &profiles );
g_signal_emit_by_name( view, TREE_SIGNAL_COUNT_CHANGED, FALSE, menus, actions, profiles );
}
@@ -933,7 +933,7 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
static const gchar *thisfn = "nact_tree_ieditable_set_items";
IEditableData *ied;
GList *it;
- NAObjectItem *new_item, *old_item;
+ FMAObjectItem *new_item, *old_item;
gchar *id;
GtkTreePath *path, *insert_path;
@@ -945,9 +945,9 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
ied = get_instance_data( instance );
for( it = items ; it ; it = it->next ){
- new_item = NA_OBJECT_ITEM( it->data );
+ new_item = FMA_OBJECT_ITEM( it->data );
- id = na_object_get_id( new_item );
+ id = fma_object_get_id( new_item );
old_item = nact_tree_view_get_item_by_id( NACT_TREE_VIEW( instance ), id );
if( !old_item ){
@@ -957,7 +957,7 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
g_warning( "%s: id=%s: old is a %s while new is a %s - ignored", thisfn, id,
G_OBJECT_TYPE_NAME( old_item ), G_OBJECT_TYPE_NAME( new_item ));
- } else if( NA_IS_OBJECT_MENU( old_item )){
+ } else if( FMA_IS_OBJECT_MENU( old_item )){
/* hopefully, na_factory_object_copy only copy valuable properties
* keeping dynamic variables as parent pointer, provider and provider
* data, read-only status - notably children are not impacted by this
@@ -965,7 +965,7 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
*/
na_factory_object_copy( FMA_IFACTORY_OBJECT( old_item ), FMA_IFACTORY_OBJECT(
new_item ));
- } else if( NA_IS_OBJECT_ACTION( old_item )){
+ } else if( FMA_IS_OBJECT_ACTION( old_item )){
/* na_factory_object is not a deep copy, which is fine for the menu
* but not for the action - it appears more easier to just substitute
* the old item with the new one
@@ -973,8 +973,8 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
* only children of the old item are its own profiles, which are to be
* replaced with the profiles provided by the new item
*/
- path = nact_tree_model_delete( ied->model, NA_OBJECT( old_item ));
- insert_path = nact_tree_model_insert_before( ied->model, NA_OBJECT( new_item ), path
);
+ path = nact_tree_model_delete( ied->model, FMA_OBJECT( old_item ));
+ insert_path = nact_tree_model_insert_before( ied->model, FMA_OBJECT( new_item ), path
);
gtk_tree_path_free( path );
gtk_tree_path_free( insert_path );
@@ -1042,7 +1042,7 @@ check_level_zero_status( NactTreeIEditable *instance )
items = nact_tree_view_get_items( NACT_TREE_VIEW( instance ));
view_str = get_items_id_list_str( items );
- na_object_free_items( items );
+ fma_object_free_items( items );
status = ( g_utf8_collate( pivot_str, view_str ) != 0 );
g_debug( "%s: pivot_str='%s', view_str='%s', status=%s", thisfn, pivot_str, view_str, status ?
"True":"False" );
@@ -1064,7 +1064,7 @@ get_items_id_list_str( GList *items_list )
slist = NULL;
for( it = items_list ; it ; it = it->next ){
- id = na_object_get_id( it->data );
+ id = fma_object_get_id( it->data );
slist = g_slist_prepend( slist, id );
}
diff --git a/src/nact/nact-tree-ieditable.h b/src/nact/nact-tree-ieditable.h
index 41d292d..ebadf11 100644
--- a/src/nact/nact-tree-ieditable.h
+++ b/src/nact/nact-tree-ieditable.h
@@ -46,7 +46,7 @@
* The modified count is fully recomputed after a save.
*/
-#include "api/na-object.h"
+#include "api/fma-object.h"
#include "nact-main-window-def.h"
@@ -95,7 +95,7 @@ GList *nact_tree_ieditable_get_deleted ( NactTreeIEditable *instance
void nact_tree_ieditable_insert_items ( NactTreeIEditable *instance,
GList *items,
-
NAObject *sibling );
+
FMAObject *sibling );
void nact_tree_ieditable_insert_at_path ( NactTreeIEditable *instance,
GList *items,
diff --git a/src/nact/nact-tree-model-dnd.c b/src/nact/nact-tree-model-dnd.c
index 7343002..a6f4f46 100644
--- a/src/nact/nact-tree-model-dnd.c
+++ b/src/nact/nact-tree-model-dnd.c
@@ -36,7 +36,7 @@
#include <string.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <core/na-gnome-vfs-uri.h>
#include <core/na-importer.h>
@@ -123,14 +123,14 @@ static const gchar *st_parent_not_writable = N_( "Unable to drop here as parent
static const gchar *st_level_zero_not_writable = N_( "Unable to drop here as level zero is not writable" );
static gboolean drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data
);
-static gboolean is_drop_possible( NactTreeModel *model, GtkTreePath *dest, NAObjectItem **parent );
-static gboolean is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainWindow
*window, NAObjectItem **parent );
-static gboolean is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, NactMainWindow
*window, NAObjectItem **parent );
+static gboolean is_drop_possible( NactTreeModel *model, GtkTreePath *dest, FMAObjectItem **parent );
+static gboolean is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainWindow
*window, FMAObjectItem **parent );
+static gboolean is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, NactMainWindow
*window, FMAObjectItem **parent );
static void drop_inside_move_dest( NactTreeModel *model, GList *rows, GtkTreePath **dest );
static gboolean drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData
*selection_data );
-static NAObjectItem *is_dropped_already_exists( const NAObjectItem *importing, const NactMainWindow *window
);
+static FMAObjectItem *is_dropped_already_exists( const FMAObjectItem *importing, const NactMainWindow
*window );
static char *get_xds_atom_value( GdkDragContext *context );
-static gboolean is_parent_accept_new_children( NactApplication *application, NactMainWindow *window,
NAObjectItem *parent );
+static gboolean is_parent_accept_new_children( NactApplication *application, NactMainWindow *window,
FMAObjectItem *parent );
static guint target_atom_to_id( GdkAtom atom );
/**
@@ -433,7 +433,7 @@ nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *dr
GtkTreeModel *store;
GtkTreePath *path;
GtkTreeIter iter;
- NAObject *object;
+ FMAObject *object;
GList *it;
g_debug( "%s: drag_source=%p (ref_count=%d), rows=%p (%d items)",
@@ -455,7 +455,7 @@ nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *dr
gtk_tree_model_get_iter( store, &iter, path );
gtk_tree_model_get( store, &iter, TREE_COLUMN_NAOBJECT, &object, -1 );
- if( NA_IS_OBJECT_PROFILE( object )){
+ if( FMA_IS_OBJECT_PROFILE( object )){
model->private->drag_has_profiles = TRUE;
}
@@ -566,13 +566,13 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
NactApplication *application;
NAUpdater *updater;
NactMainWindow *main_window;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
gboolean copy_data;
GList *rows;
GtkTreePath *new_dest;
GtkTreePath *path;
- NAObject *current;
- NAObject *inserted;
+ FMAObject *current;
+ FMAObject *inserted;
GList *object_list, *it;
GtkTreeIter iter;
GList *deletable;
@@ -613,22 +613,22 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
g_object_unref( current );
if( copy_data ){
- inserted = ( NAObject * ) na_object_duplicate( current, DUPLICATE_REC
);
- na_object_set_origin( inserted, NULL );
- na_object_check_status( inserted );
+ inserted = ( FMAObject * ) fma_object_duplicate( current,
DUPLICATE_REC );
+ fma_object_set_origin( inserted, NULL );
+ fma_object_check_status( inserted );
relabel = na_updater_should_pasted_be_relabeled( updater, inserted );
} else {
- inserted = na_object_ref( current );
+ inserted = fma_object_ref( current );
deletable = g_list_prepend( NULL, inserted );
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( items_view ),
deletable, TREE_OPE_MOVE );
g_list_free( deletable );
relabel = FALSE;
}
- na_object_prepare_for_paste( inserted, relabel, copy_data, parent );
+ fma_object_prepare_for_paste( inserted, relabel, copy_data, parent );
object_list = g_list_prepend( object_list, inserted );
- g_debug( "%s: dropped=%s", thisfn, na_object_get_label( inserted ));
+ g_debug( "%s: dropped=%s", thisfn, fma_object_get_label( inserted ));
}
gtk_tree_path_free( path );
}
@@ -637,7 +637,7 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
nact_tree_ieditable_insert_at_path( NACT_TREE_IEDITABLE( items_view ), object_list, new_dest );
- na_object_free_items( object_list );
+ fma_object_free_items( object_list );
gtk_tree_path_free( new_dest );
g_list_foreach( rows, ( GFunc ) gtk_tree_row_reference_free, NULL );
@@ -660,14 +660,14 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
* dest
*/
static gboolean
-is_drop_possible( NactTreeModel *model, GtkTreePath *dest, NAObjectItem **parent )
+is_drop_possible( NactTreeModel *model, GtkTreePath *dest, FMAObjectItem **parent )
{
NactTreeModelPrivate *priv;
gboolean drop_ok;
GtkApplication *application;
NactMainWindow *main_window;
GtkTreeIter iter;
- NAObjectItem *parent_dest;
+ FMAObjectItem *parent_dest;
NactStatusbar *bar;
priv = model->private;
@@ -720,11 +720,11 @@ is_drop_possible( NactTreeModel *model, GtkTreePath *dest, NAObjectItem **parent
}
static gboolean
-is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainWindow *window, NAObjectItem
**parent )
+is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainWindow *window, FMAObjectItem
**parent )
{
static const gchar *thisfn = "nact_tree_model_dnd_is_drop_possible_before_iter";
gboolean drop_ok;
- NAObject *object;
+ FMAObject *object;
NactStatusbar *bar;
drop_ok = FALSE;
@@ -737,9 +737,9 @@ is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainW
if( model->private->drag_has_profiles ){
- if( NA_IS_OBJECT_PROFILE( object )){
+ if( FMA_IS_OBJECT_PROFILE( object )){
drop_ok = TRUE;
- *parent = na_object_get_parent( object );
+ *parent = fma_object_get_parent( object );
} else {
/* unable to drop a profile here */
@@ -747,9 +747,9 @@ is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainW
bar, TREE_MODEL_STATUSBAR_CONTEXT, gettext( st_refuse_drop_profile ));
}
- } else if( NA_IS_OBJECT_ITEM( object )){
+ } else if( FMA_IS_OBJECT_ITEM( object )){
drop_ok = TRUE;
- *parent = na_object_get_parent( object );
+ *parent = fma_object_get_parent( object );
} else {
/* unable to drop an action or a menu here */
@@ -761,13 +761,13 @@ is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, NactMainW
}
static gboolean
-is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, NactMainWindow *window, NAObjectItem
**parent )
+is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, NactMainWindow *window, FMAObjectItem
**parent )
{
static const gchar *thisfn = "nact_tree_model_dnd_is_drop_possible_into_dest";
gboolean drop_ok;
GtkTreePath *path;
GtkTreeIter iter;
- NAObject *object;
+ FMAObject *object;
NactStatusbar *bar;
drop_ok = FALSE;
@@ -784,18 +784,18 @@ is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, NactMainWin
if( model->private->drag_has_profiles ){
- if( NA_IS_OBJECT_ACTION( object )){
+ if( FMA_IS_OBJECT_ACTION( object )){
drop_ok = TRUE;
- *parent = NA_OBJECT_ITEM( object );
+ *parent = FMA_OBJECT_ITEM( object );
} else {
nact_statusbar_display_with_timeout(
bar, TREE_MODEL_STATUSBAR_CONTEXT, gettext(
st_refuse_drop_profile ));
}
- } else if( NA_IS_OBJECT_MENU( object )){
+ } else if( FMA_IS_OBJECT_MENU( object )){
drop_ok = TRUE;
- *parent = na_object_get_parent( object );
+ *parent = fma_object_get_parent( object );
} else {
nact_statusbar_display_with_timeout(
@@ -962,7 +962,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
/* insert newly imported items in the list view
*/
if( imported ){
- na_object_dump_tree( imported );
+ fma_object_dump_tree( imported );
view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_at_path( NACT_TREE_IEDITABLE( view ), imported, dest );
}
@@ -971,15 +971,15 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
* they may safely be released after having updated the store
*/
if( overriden ){
- na_object_dump_tree( overriden );
+ fma_object_dump_tree( overriden );
view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_set_items( NACT_TREE_IEDITABLE( view ), overriden );
- na_object_free_items( overriden );
+ fma_object_free_items( overriden );
}
drop_done = TRUE;
- na_object_free_items( imported );
- na_object_free_items( overriden );
+ fma_object_free_items( imported );
+ fma_object_free_items( overriden );
fma_core_utils_slist_free( parms.uris );
for( it = import_results ; it ; it = it->next ){
@@ -990,14 +990,14 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
return( drop_done );
}
-static NAObjectItem *
-is_dropped_already_exists( const NAObjectItem *importing, const NactMainWindow *window )
+static FMAObjectItem *
+is_dropped_already_exists( const FMAObjectItem *importing, const NactMainWindow *window )
{
NactTreeView *items_view;
- gchar *id = na_object_get_id( importing );
+ gchar *id = fma_object_get_id( importing );
items_view = nact_main_window_get_items_view( window );
- NAObjectItem *exists = nact_tree_view_get_item_by_id( items_view, id );
+ FMAObjectItem *exists = nact_tree_view_get_item_by_id( items_view, id );
g_free( id );
return( exists );
@@ -1012,20 +1012,20 @@ is_row_drop_possible( NactTreeModel *model, GtkTreePath *path, GtkTreeViewDropPo
gboolean ok = FALSE;
GtkTreeModel *store;
GtkTreeIter iter;
- NAObject *object;
+ FMAObject *object;
store = gtk_tree_model_filter_get_model( GTK_TREE_MODEL_FILTER( model ));
gtk_tree_model_get_iter( store, &iter, path );
gtk_tree_model_get( store, &iter, IACTIONS_LIST_NAOBJECT_COLUMN, &object, -1 );
if( model->private->drag_has_profiles ){
- if( NA_IS_OBJECT_PROFILE( object )){
+ if( FMA_IS_OBJECT_PROFILE( object )){
ok = TRUE;
- } else if( NA_IS_OBJECT_ACTION( object )){
+ } else if( FMA_IS_OBJECT_ACTION( object )){
ok = ( pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE || pos ==
GTK_TREE_VIEW_DROP_INTO_OR_AFTER );
}
} else {
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
ok = TRUE;
}
}
@@ -1150,7 +1150,7 @@ get_xds_atom_value( GdkDragContext *context )
* to register the new child
*/
static gboolean
-is_parent_accept_new_children( NactApplication *application, NactMainWindow *window, NAObjectItem *parent )
+is_parent_accept_new_children( NactApplication *application, NactMainWindow *window, FMAObjectItem *parent )
{
gboolean accept_ok;
NAUpdater *updater;
@@ -1174,7 +1174,7 @@ is_parent_accept_new_children( NactApplication *application, NactMainWindow *win
/* see if the parent is writable
*/
- } else if( na_object_is_finally_writable( parent, NULL )){
+ } else if( fma_object_is_finally_writable( parent, NULL )){
accept_ok = TRUE;
} else {
diff --git a/src/nact/nact-tree-model.c b/src/nact/nact-tree-model.c
index 0a2368c..6dd0984 100644
--- a/src/nact/nact-tree-model.c
+++ b/src/nact/nact-tree-model.c
@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <string.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-iprefs.h"
@@ -48,7 +48,7 @@
/* iter on tree store
*/
-typedef gboolean ( *FnIterOnStore )( const NactTreeModel *, GtkTreeStore *, GtkTreePath *, NAObject *,
gpointer );
+typedef gboolean ( *FnIterOnStore )( const NactTreeModel *, GtkTreeStore *, GtkTreePath *, FMAObject *,
gpointer );
/* getting the list of items
* - mode is the indicator of the wished content
@@ -65,7 +65,7 @@ typedef struct {
*/
typedef struct {
gchar *id;
- NAObject *object;
+ FMAObject *object;
GtkTreeIter *iter;
}
ntmFindId;
@@ -74,7 +74,7 @@ typedef struct {
* setting the iter if found
*/
typedef struct {
- const NAObject *object;
+ const FMAObject *object;
GtkTreeIter *iter;
GtkTreePath *path;
}
@@ -108,21 +108,21 @@ static void connect_item_updated_signal( NactTreeModel *tmodel );
static void on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpointer
new_value, gboolean mandatory, NactTreeModel *model );
static void on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, NactTreeModel
*model );
static void setup_dnd_edition( NactTreeModel *tmodel );
-static void append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter
*iter, const NAObject *object );
-static void display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, const NAObject
*object );
+static void append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter
*iter, const FMAObject *object );
+static void display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, const FMAObject
*object );
static void display_order_change( NactTreeModel *model, gint order_mode );
#if 0
static void dump( NactTreeModel *model );
-static gboolean dump_store( NactTreeModel *model, GtkTreePath *path, NAObject *object, ntmDumpStruct *ntm );
+static gboolean dump_store( NactTreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm );
#endif
-static void fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, NAObject *object, GtkTreeIter
*parent );
+static void fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, FMAObject *object, GtkTreeIter
*parent );
static gboolean filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model );
-static gboolean find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject
*object, ntmFindId *nfo );
-static gboolean find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject
*object, ntmFindObject *nfo );
-static gboolean get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject
*object, ntmGetItems *ngi );
+static gboolean find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindId *nfo );
+static gboolean find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindObject *nfo );
+static gboolean get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path,
FMAObject *object, ntmGetItems *ngi );
static void iter_on_store( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *parent,
FnIterOnStore fn, gpointer user_data );
static gboolean iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *iter,
FnIterOnStore fn, gpointer user_data );
-static void remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const NAObject *object );
+static void remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const FMAObject *object );
static gboolean delete_items_rec( GtkTreeStore *store, GtkTreeIter *iter );
static gint sort_actions_list( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data );
@@ -382,7 +382,7 @@ nact_tree_model_new( GtkTreeView *treeview )
/* create the underlying tree store */
ts_model = gtk_tree_store_new(
- TREE_N_COLUMN, GDK_TYPE_PIXBUF, G_TYPE_STRING, NA_TYPE_OBJECT );
+ TREE_N_COLUMN, GDK_TYPE_PIXBUF, G_TYPE_STRING, FMA_TYPE_OBJECT );
/* create our filter model */
model = g_object_new( NACT_TYPE_TREE_MODEL,
@@ -542,11 +542,11 @@ on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, Nact
( void * ) model );
if( data & ( MAIN_DATA_LABEL | MAIN_DATA_ICON )){
- path = nact_tree_model_object_to_path( model, ( NAObject * ) context );
+ path = nact_tree_model_object_to_path( model, ( FMAObject * ) context );
if( path ){
store = GTK_TREE_STORE( gtk_tree_model_filter_get_model(
GTK_TREE_MODEL_FILTER( model )));
if( gtk_tree_model_get_iter( GTK_TREE_MODEL( store ), &iter, path )){
- display_item( store, model->private->treeview, &iter, ( NAObject * )
context );
+ display_item( store, model->private->treeview, &iter, ( FMAObject * )
context );
gtk_tree_model_row_changed( GTK_TREE_MODEL( store ), path, &iter );
}
gtk_tree_path_free( path );
@@ -598,20 +598,20 @@ setup_dnd_edition( NactTreeModel *tmodel )
/**
* nact_tree_model_delete:
* @model: this #NactTreeModel instance.
- * @object: the #NAObject to be deleted.
+ * @object: the #FMAObject to be deleted.
*
* Recursively deletes the specified object.
*
* Returns: a path which may be suitable for the next selection.
*/
GtkTreePath *
-nact_tree_model_delete( NactTreeModel *model, NAObject *object )
+nact_tree_model_delete( NactTreeModel *model, FMAObject *object )
{
GtkTreePath *path;
static const gchar *thisfn = "nact_tree_model_delete";
GtkTreeIter iter;
GtkTreeStore *store;
- NAObjectItem *parent;
+ FMAObjectItem *parent;
g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
@@ -627,10 +627,10 @@ nact_tree_model_delete( NactTreeModel *model, NAObject *object )
/* detaching to-be-deleted object from its current parent
*/
- parent = na_object_get_parent( object );
+ parent = fma_object_get_parent( object );
g_debug( "%s: object=%p, parent=%p", thisfn, ( void * ) object, ( void * ) parent );
if( parent ){
- na_object_remove_item( parent, object );
+ fma_object_remove_item( parent, object );
}
/* then recursively remove the object and its children from the store
@@ -664,7 +664,7 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
static const gchar *thisfn = "nact_tree_model_fill";
GtkTreeStore *ts_model;
GList *it;
- NAObject *duplicate;
+ FMAObject *duplicate;
g_return_if_fail( NACT_IS_TREE_MODEL( model ));
@@ -677,10 +677,10 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
gtk_tree_store_clear( ts_model );
for( it = items ; it ; it = it->next ){
- duplicate = ( NAObject * ) na_object_duplicate( it->data, DUPLICATE_REC );
- na_object_check_status( duplicate );
+ duplicate = ( FMAObject * ) fma_object_duplicate( it->data, DUPLICATE_REC );
+ fma_object_check_status( duplicate );
fill_tree_store( ts_model, model->private->treeview, duplicate, NULL );
- na_object_unref( duplicate );
+ fma_object_unref( duplicate );
}
}
}
@@ -688,7 +688,7 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
/**
* nact_tree_model_insert_before:
* @model: this #NactTreeModel instance.
- * @object: a #NAObject-derived object to be inserted.
+ * @object: a #FMAObject-derived object to be inserted.
* @path: the #GtkTreePath which specifies the insertion path.
* @parent: set to the parent or the object itself.
*
@@ -702,7 +702,7 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
* asked insertion path if tree is sorted.
*/
GtkTreePath *
-nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, GtkTreePath *path )
+nact_tree_model_insert_before( NactTreeModel *model, const FMAObject *object, GtkTreePath *path )
{
static const gchar *thisfn = "nact_tree_model_insert_before";
GtkTreeModel *store;
@@ -711,10 +711,10 @@ nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, Gtk
GtkTreeIter parent_iter;
GtkTreePath *parent_path;
GtkTreePath *inserted_path;
- NAObject *parent_obj;
+ FMAObject *parent_obj;
gboolean has_parent;
GtkTreeIter sibling_iter;
- NAObject *sibling_obj;
+ FMAObject *sibling_obj;
gboolean has_sibling;
path_str = gtk_tree_path_to_string( path );
@@ -725,7 +725,7 @@ nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, Gtk
( void * ) path, path_str );
g_free( path_str );
g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
- g_return_val_if_fail( NA_IS_OBJECT( object ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
inserted_path = NULL;
@@ -758,12 +758,12 @@ nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, Gtk
g_object_unref( parent_obj );
if( has_sibling ){
- na_object_insert_item( parent_obj, object, sibling_obj );
+ fma_object_insert_item( parent_obj, object, sibling_obj );
} else {
- na_object_append_item( parent_obj, object );
+ fma_object_append_item( parent_obj, object );
}
- na_object_set_parent( object, parent_obj );
+ fma_object_set_parent( object, parent_obj );
}
g_debug( "%s: has_parent=%s, parent_obj=%p", thisfn, has_parent ? "True":"False", ( void * )
parent_obj );
@@ -787,7 +787,7 @@ nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, Gtk
/**
* nact_tree_model_insert_into:
* @model: this #NactTreeModel instance.
- * @object: the #NAObject to be inserted.
+ * @object: the #FMAObject to be inserted.
* @path: the wished #GtkTreePath path.
*
* Insert the @object at ou near the wished @path, and attaches the object
@@ -797,7 +797,7 @@ nact_tree_model_insert_before( NactTreeModel *model, const NAObject *object, Gtk
* by the caller.
*/
GtkTreePath *
-nact_tree_model_insert_into( NactTreeModel *model, const NAObject *object, GtkTreePath *path )
+nact_tree_model_insert_into( NactTreeModel *model, const FMAObject *object, GtkTreePath *path )
{
static const gchar *thisfn = "nact_tree_model_insert_into";
GtkTreeModel *store;
@@ -805,7 +805,7 @@ nact_tree_model_insert_into( NactTreeModel *model, const NAObject *object, GtkTr
GtkTreeIter parent_iter;
GtkTreePath *new_path;
gchar *path_str;
- NAObject *parent;
+ FMAObject *parent;
path_str = gtk_tree_path_to_string( path );
g_debug( "%s: model=%p, object=%p (%s, ref_count=%d), path=%p (%s), parent=%p",
@@ -815,7 +815,7 @@ nact_tree_model_insert_into( NactTreeModel *model, const NAObject *object, GtkTr
( void * ) path, path_str, ( void * ) parent );
g_free( path_str );
g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
- g_return_val_if_fail( NA_IS_OBJECT( object ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
new_path = NULL;
@@ -832,8 +832,8 @@ nact_tree_model_insert_into( NactTreeModel *model, const NAObject *object, GtkTr
gtk_tree_model_get( store, &parent_iter, TREE_COLUMN_NAOBJECT, &parent, -1 );
g_object_unref( parent );
- na_object_insert_item( parent, object, NULL );
- na_object_set_parent( object, parent );
+ fma_object_insert_item( parent, object, NULL );
+ fma_object_set_parent( object, parent );
gtk_tree_store_insert_after( GTK_TREE_STORE( store ), &iter, &parent_iter, NULL );
gtk_tree_store_set( GTK_TREE_STORE( store ), &iter, TREE_COLUMN_NAOBJECT, object, -1 );
@@ -852,14 +852,14 @@ nact_tree_model_insert_into( NactTreeModel *model, const NAObject *object, GtkTr
/**
* nact_tree_model_get_item_by_id:
* @model: this #NactTreeModel object.
- * @id: the searched #NAObjectItem.
+ * @id: the searched #FMAObjectItem.
*
- * Returns: a pointer on the searched #NAObjectItem if it exists, or %NULL.
+ * Returns: a pointer on the searched #FMAObjectItem if it exists, or %NULL.
*
* The returned pointer is owned by the underlying tree store, and should
* not be released by the caller.
*/
-NAObjectItem *
+FMAObjectItem *
nact_tree_model_get_item_by_id( const NactTreeModel *model, const gchar *id )
{
static const gchar *thisfn = "nact_tree_model_get_item_by_id";
@@ -878,7 +878,7 @@ nact_tree_model_get_item_by_id( const NactTreeModel *model, const gchar *id )
iter_on_store( model, GTK_TREE_MODEL( store ), NULL, ( FnIterOnStore ) find_item_iter, &nfi );
}
- return(( NAObjectItem * ) nfi.object );
+ return(( FMAObjectItem * ) nfi.object );
}
/**
@@ -887,7 +887,7 @@ nact_tree_model_get_item_by_id( const NactTreeModel *model, const gchar *id )
* @mode: the content indicator for the returned list
*
* Returns: the content of the current store as a newly allocated list
- * which should be na_object_free_items() by the caller.
+ * which should be fma_object_free_items() by the caller.
*/
GList *
nact_tree_model_get_items( const NactTreeModel *model, guint mode )
@@ -919,15 +919,15 @@ nact_tree_model_get_items( const NactTreeModel *model, guint mode )
* @model: this #NactTreeModel instance.
* @path: the #GtkTreePath to be searched.
*
- * Returns: the #NAObject at the given @path if any, or NULL.
+ * Returns: the #FMAObject at the given @path if any, or NULL.
*
* The reference count of the object is not modified. The returned reference
* is owned by the tree store and should not be released by the caller.
*/
-NAObject *
+FMAObject *
nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
{
- NAObject *object;
+ FMAObject *object;
GtkTreeModel *store;
GtkTreeIter iter;
@@ -950,7 +950,7 @@ nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
/**
* nact_tree_model_object_to_path:
* @model: this #NactTreeModel.
- * @object: the searched NAObject.
+ * @object: the searched FMAObject.
*
* Returns: a newly allocated GtkTreePath which is the current position
* of @object in the tree store, or %NULL.
@@ -958,7 +958,7 @@ nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
* The returned path should be gtk_tree_path_free() by the caller.
*/
GtkTreePath *
-nact_tree_model_object_to_path( const NactTreeModel *model, const NAObject *object )
+nact_tree_model_object_to_path( const NactTreeModel *model, const FMAObject *object )
{
static const gchar *thisfn = "nact_tree_model_object_to_path";
ntmFindObject nfo;
@@ -984,7 +984,7 @@ nact_tree_model_object_to_path( const NactTreeModel *model, const NAObject *obje
}
static void
-append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter *iter, const
NAObject *object )
+append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter *iter, const
FMAObject *object )
{
/*g_debug( "nact_tree_model_append_item: object=%p (ref_count=%d), parent=%p",
( void * ) object, G_OBJECT( object )->ref_count, ( void * ) parent
);*/
@@ -995,14 +995,14 @@ append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, Gt
}
static void
-display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, const NAObject *object )
+display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, const FMAObject *object )
{
- gchar *label = na_object_get_label( object );
+ gchar *label = fma_object_get_label( object );
gtk_tree_store_set( model, iter, TREE_COLUMN_LABEL, label, -1 );
g_free( label );
- if( NA_IS_OBJECT_ITEM( object )){
- gchar *icon_name = na_object_get_icon( object );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ gchar *icon_name = fma_object_get_icon( object );
GdkPixbuf *icon = base_gtk_utils_get_pixbuf( icon_name, GTK_WIDGET( treeview ),
GTK_ICON_SIZE_MENU );
gtk_tree_store_set( model, iter, TREE_COLUMN_ICON, icon, -1 );
g_object_unref( icon );
@@ -1071,18 +1071,18 @@ dump( NactTreeModel *model )
GList *items;
items = nact_tree_model_get_items( model, TREE_LIST_ALL );
- na_object_dump_tree( items );
- na_object_free_items( items );
+ fma_object_dump_tree( items );
+ fma_object_free_items( items );
}
static gboolean
-dump_store( NactTreeModel *model, GtkTreePath *path, NAObject *object, ntmDumpStruct *ntm )
+dump_store( NactTreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm )
{
gint depth;
gint i;
GString *prefix;
gchar *id, *label;
- NAObjectItem *origin;
+ FMAObjectItem *origin;
depth = gtk_tree_path_get_depth( path );
prefix = g_string_new( ntm->prefix );
@@ -1090,9 +1090,9 @@ dump_store( NactTreeModel *model, GtkTreePath *path, NAObject *object, ntmDumpSt
g_string_append_printf( prefix, " " );
}
- id = na_object_get_id( object );
- label = na_object_get_label( object );
- origin = ( NAObjectItem * ) na_object_get_origin( object );
+ id = fma_object_get_id( object );
+ label = fma_object_get_label( object );
+ origin = ( FMAObjectItem * ) fma_object_get_origin( object );
g_debug( "%s: %s%s at %p (ref_count=%d) \"[%s] %s\" origin=%p (%s)",
ntm->fname, prefix->str,
G_OBJECT_TYPE_NAME( object ), ( void * ) object, G_OBJECT( object )->ref_count, id,
label,
@@ -1108,7 +1108,7 @@ dump_store( NactTreeModel *model, GtkTreePath *path, NAObject *object, ntmDumpSt
#endif
static void
-fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, NAObject *object, GtkTreeIter *parent )
+fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, FMAObject *object, GtkTreeIter *parent )
{
static const gchar *thisfn = "nact_tree_model_fill_tree_store";
GList *subitems, *it;
@@ -1119,15 +1119,15 @@ fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, NAObject *object, G
/* an action or a menu
*/
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
append_item( model, treeview, parent, &iter, object );
- subitems = na_object_get_items( object );
+ subitems = fma_object_get_items( object );
for( it = subitems ; it ; it = it->next ){
fill_tree_store( model, treeview, it->data, &iter );
}
} else {
- g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
+ g_return_if_fail( FMA_IS_OBJECT_PROFILE( object ));
append_item( model, treeview, parent, &iter, object );
}
@@ -1139,13 +1139,13 @@ fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, NAObject *object, G
* Only display profiles when we are in edition mode.
*
* This function is called as soon as a new row is created in the tree store,
- * so is called the first time _before_ the NAObject be set on the row.
+ * so is called the first time _before_ the FMAObject be set on the row.
*/
static gboolean
filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
{
- NAObject *object;
- NAObjectAction *action;
+ FMAObject *object;
+ FMAObjectAction *action;
gint count;
gtk_tree_model_get( store, iter, TREE_COLUMN_NAOBJECT, &object, -1 );
@@ -1156,7 +1156,7 @@ filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
/* an action or a menu are always displayed, whatever the current
* management mode may be
*/
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
return( TRUE );
}
@@ -1164,14 +1164,14 @@ filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
* in edition mode, they are displayed only when the action has
* more than one profile
*/
- g_return_val_if_fail( NA_IS_OBJECT_PROFILE( object ), FALSE );
+ g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( object ), FALSE );
if( NACT_TREE_MODEL( model )->private->mode == TREE_MODE_SELECTION ){
return( FALSE );
}
- action = NA_OBJECT_ACTION( na_object_get_parent( object ));
- count = na_object_get_items_count( action );
+ action = FMA_OBJECT_ACTION( fma_object_get_parent( object ));
+ count = fma_object_get_items_count( action );
return( count > 1 );
}
@@ -1182,13 +1182,13 @@ filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
* search for an object, given its id
*/
static gboolean
-find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject *object, ntmFindId
*nfi )
+find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object, ntmFindId
*nfi )
{
gchar *id;
gboolean found = FALSE;
- if( NA_IS_OBJECT_ITEM( object )){
- id = na_object_get_id( object );
+ if( FMA_IS_OBJECT_ITEM( object )){
+ id = fma_object_get_id( object );
found = ( g_ascii_strcasecmp( id, nfi->id ) == 0 );
g_free( id );
@@ -1202,7 +1202,7 @@ find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NA
}
static gboolean
-find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject *object,
ntmFindObject *nfo )
+find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmFindObject *nfo )
{
if( object == nfo->object ){
if( gtk_tree_model_get_iter( GTK_TREE_MODEL( store ), nfo->iter, path )){
@@ -1221,11 +1221,11 @@ find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path,
* This function is called from iter_on_store_item();
*/
static gboolean
-get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, NAObject *object,
ntmGetItems *ngi )
+get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmGetItems *ngi )
{
if( ngi->mode & TREE_LIST_ALL ){
if( gtk_tree_path_get_depth( path ) == 1 ){
- ngi->items = g_list_prepend( ngi->items, na_object_ref( object ));
+ ngi->items = g_list_prepend( ngi->items, fma_object_ref( object ));
}
}
@@ -1251,7 +1251,7 @@ iter_on_store( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *par
static gboolean
iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *iter, FnIterOnStore fn,
gpointer user_data )
{
- NAObject *object;
+ FMAObject *object;
GtkTreePath *path;
gboolean stop;
@@ -1282,14 +1282,14 @@ iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter
* then remove it first
*/
static void
-remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const NAObject *object )
+remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const FMAObject *object )
{
ntmFindId nfi;
GtkTreeIter iter;
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
- nfi.id = na_object_get_id( object );
+ nfi.id = fma_object_get_id( object );
nfi.object = NULL;
nfi.iter = &iter;
@@ -1327,7 +1327,7 @@ static gint
sort_actions_list( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data )
{
/*static const gchar *thisfn = "nact_tree_model_sort_actions_list";*/
- NAObjectId *obj_a, *obj_b;
+ FMAObjectId *obj_a, *obj_b;
gint ret;
/*g_debug( "%s: model=%p, a=%p, b=%p, window=%p", thisfn, ( void * ) model, ( void * ) a, ( void * )
b, ( void * ) window );*/
@@ -1338,10 +1338,10 @@ sort_actions_list( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer
g_object_unref( obj_b );
g_object_unref( obj_a );
- if( NA_IS_OBJECT_PROFILE( obj_a )){
+ if( FMA_IS_OBJECT_PROFILE( obj_a )){
ret = 0;
} else {
- ret = na_object_sort_alpha_asc( obj_a, obj_b );
+ ret = fma_object_sort_alpha_asc( obj_a, obj_b );
}
/*g_debug( "%s: ret=%d", thisfn, ret );*/
diff --git a/src/nact/nact-tree-model.h b/src/nact/nact-tree-model.h
index be0f52f..76fd22e 100644
--- a/src/nact/nact-tree-model.h
+++ b/src/nact/nact-tree-model.h
@@ -44,7 +44,7 @@
#ifndef __NACT_TREE_MODEL_H__
#define __NACT_TREE_MODEL_H__
-#include "api/na-object.h"
+#include "api/fma-object.h"
#include "nact-main-window-def.h"
@@ -93,30 +93,30 @@ void nact_tree_model_set_edition_mode( NactTreeModel *tmodel,
guint mode );
GtkTreePath *nact_tree_model_delete ( NactTreeModel *model,
-
NAObject *object );
+
FMAObject *object );
void nact_tree_model_fill ( NactTreeModel *model,
GList *items );
GtkTreePath *nact_tree_model_insert_before ( NactTreeModel *model,
-
const NAObject *object,
+
const FMAObject *object,
GtkTreePath *path );
GtkTreePath *nact_tree_model_insert_into ( NactTreeModel *model,
-
const NAObject *object,
+
const FMAObject *object,
GtkTreePath *path );
-NAObjectItem *nact_tree_model_get_item_by_id ( const NactTreeModel *model,
+FMAObjectItem *nact_tree_model_get_item_by_id ( const NactTreeModel *model,
const gchar *id );
GList *nact_tree_model_get_items ( const NactTreeModel *model,
guint mode );
-NAObject *nact_tree_model_object_at_path ( const NactTreeModel *model,
+FMAObject *nact_tree_model_object_at_path ( const NactTreeModel *model,
GtkTreePath *path );
GtkTreePath *nact_tree_model_object_to_path ( const NactTreeModel *model,
-
const NAObject *object );
+
const FMAObject *object );
G_END_DECLS
diff --git a/src/nact/nact-tree-view.c b/src/nact/nact-tree-view.c
index 278a897..13ea32b 100644
--- a/src/nact/nact-tree-view.c
+++ b/src/nact/nact-tree-view.c
@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
-#include "api/na-object-api.h"
+#include "api/fma-object-api.h"
#include "core/na-gtk-utils.h"
@@ -89,7 +89,7 @@ enum {
/* iter on selection prototype
*/
-typedef gboolean ( *FnIterOnSelection )( NactTreeView *, GtkTreeModel *, GtkTreeIter *, NAObject *, gpointer
);
+typedef gboolean ( *FnIterOnSelection )( NactTreeView *, GtkTreeModel *, GtkTreeIter *, FMAObject *,
gpointer );
static gint st_signals[ LAST_SIGNAL ] = { 0 };
static GObjectClass *st_parent_class = NULL;
@@ -119,7 +119,7 @@ static void navigate_to_parent( NactTreeView *view );
static void do_open_popup( NactTreeView *view, GdkEventButton *event );
static void select_row_at_path_by_string( NactTreeView *view, const gchar *path );
static void toggle_collapse( NactTreeView *view );
-static gboolean toggle_collapse_iter( NactTreeView *view, GtkTreeModel *model, GtkTreeIter *iter, NAObject
*object, gpointer user_data );
+static gboolean toggle_collapse_iter( NactTreeView *view, GtkTreeModel *model, GtkTreeIter *iter,
FMAObject *object, gpointer user_data );
static void toggle_collapse_row( GtkTreeView *treeview, GtkTreePath *path, guint *toggle );
GType
@@ -292,7 +292,7 @@ class_init( NactTreeViewClass *klass )
* NactTreeView::tree-signal-modified-status-changed:
*
* This signal is emitted on the BaseWindow when the view detects that
- * the count of modified NAObjectItems has changed, when an item is
+ * the count of modified FMAObjectItems has changed, when an item is
* deleted, or when the level zero is changed.
*
* The signal is actually emitted by the NactTreeIEditable interface
@@ -328,7 +328,7 @@ class_init( NactTreeViewClass *klass )
* they have connected to this 'selection-changed' signal.
*
* Signal args:
- * - a #GList of currently selected #NAObjectItems.
+ * - a #GList of currently selected #FMAObjectItems.
*
* Handler prototype:
* void handler( NactTreeView *tview,
@@ -750,7 +750,7 @@ nact_tree_view_fill( NactTreeView *view, GList *items )
g_debug( "%s: nact_tree_model_ref_count=%d", thisfn, G_OBJECT( model )->ref_count );
view->private->notify_allowed = TRUE;
- na_object_count_items( items, &nb_menus, &nb_actions, &nb_profiles );
+ fma_object_count_items( items, &nb_menus, &nb_actions, &nb_profiles );
g_signal_emit_by_name( view, TREE_SIGNAL_COUNT_CHANGED, TRUE, nb_menus, nb_actions,
nb_profiles );
g_signal_emit_by_name( view, TREE_SIGNAL_MODIFIED_STATUS_CHANGED, FALSE );
@@ -834,17 +834,17 @@ nact_tree_view_expand_all( const NactTreeView *view )
/**
* nact_tree_view_get_item_by_id:
* @view: this #NactTreeView instance.
- * @id: the searched #NAObjectItem.
+ * @id: the searched #FMAObjectItem.
*
- * Returns: a pointer on the searched #NAObjectItem if it exists, or %NULL.
+ * Returns: a pointer on the searched #FMAObjectItem if it exists, or %NULL.
*
* The returned pointer is owned by the underlying tree store, and should
* not be released by the caller.
*/
-NAObjectItem *
+FMAObjectItem *
nact_tree_view_get_item_by_id( const NactTreeView *view, const gchar *id )
{
- NAObjectItem *item;
+ FMAObjectItem *item;
NactTreeModel *model;
g_return_val_if_fail( NACT_IS_TREE_VIEW( view ), NULL );
@@ -865,7 +865,7 @@ nact_tree_view_get_item_by_id( const NactTreeView *view, const gchar *id )
* @view: this #NactTreeView instance.
*
* Returns: the content of the current tree as a newly allocated list
- * which should be na_object_free_items() by the caller.
+ * which should be fma_object_free_items() by the caller.
*/
GList *
nact_tree_view_get_items( const NactTreeView *view )
@@ -879,7 +879,7 @@ nact_tree_view_get_items( const NactTreeView *view )
* @mode: the list content
*
* Returns: the content of the current tree as a newly allocated list
- * which should be na_object_free_items() by the caller.
+ * which should be fma_object_free_items() by the caller.
*/
GList *
nact_tree_view_get_items_ex( const NactTreeView *view, guint mode )
@@ -996,7 +996,7 @@ on_selection_changed_cleanup_handler( NactTreeView *tview, GList *selected_items
thisfn, ( void * ) tview,
( void * ) selected_items, g_list_length( selected_items ));
- na_object_free_items( selected_items );
+ fma_object_free_items( selected_items );
}
/*
@@ -1006,7 +1006,7 @@ on_selection_changed_cleanup_handler( NactTreeView *tview, GList *selected_items
static void
display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter,
NactTreeView *view )
{
- NAObject *object;
+ FMAObject *object;
gchar *label;
g_return_if_fail( view->private->mode == TREE_MODE_EDITION );
@@ -1015,17 +1015,17 @@ display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *m
if( object ){
g_object_unref( object );
- g_return_if_fail( NA_IS_OBJECT( object ));
+ g_return_if_fail( FMA_IS_OBJECT( object ));
- label = na_object_get_label( object );
+ label = fma_object_get_label( object );
g_object_set( cell, "style-set", FALSE, NULL );
g_object_set( cell, "foreground-set", FALSE, NULL );
- if( na_object_is_modified( object )){
+ if( fma_object_is_modified( object )){
g_object_set( cell, "style", PANGO_STYLE_ITALIC, "style-set", TRUE, NULL );
}
- if( !na_object_is_valid( object )){
+ if( !fma_object_is_valid( object )){
g_object_set( cell, "foreground", "Red", "foreground-set", TRUE, NULL );
}
@@ -1062,8 +1062,8 @@ extend_selection_to_children( NactTreeView *view, GtkTreeModel *model, GtkTreeIt
* We acquire here a new reference on objects corresponding to actually
* selected rows, and their children.
*
- * Returns: the currently selected rows as a #GList of #NAObjectItems
- * which should be na_object_free_items() by the caller.
+ * Returns: the currently selected rows as a #GList of #FMAObjectItems
+ * which should be fma_object_free_items() by the caller.
*/
static GList *
get_selected_items( NactTreeView *view )
@@ -1075,7 +1075,7 @@ get_selected_items( NactTreeView *view )
GtkTreePath *path;
GtkTreeIter iter;
GList *it, *listrows;
- NAObjectId *object;
+ FMAObjectId *object;
items = NULL;
selection = gtk_tree_view_get_selection( view->private->tree_view );
@@ -1085,7 +1085,7 @@ get_selected_items( NactTreeView *view )
path = ( GtkTreePath * ) it->data;
gtk_tree_model_get_iter( model, &iter, path );
gtk_tree_model_get( model, &iter, TREE_COLUMN_NAOBJECT, &object, -1 );
- items = g_list_prepend( items, na_object_ref( object ));
+ items = g_list_prepend( items, fma_object_ref( object ));
g_object_unref( object );
g_debug( "%s: object=%p (%s) ref_count=%d",
thisfn,
@@ -1106,7 +1106,7 @@ iter_on_selection( NactTreeView *view, FnIterOnSelection fn_iter, gpointer user_
GList *listrows, *ipath;
GtkTreePath *path;
GtkTreeIter iter;
- NAObject *object;
+ FMAObject *object;
gboolean stop;
stop = FALSE;
@@ -1263,19 +1263,19 @@ toggle_collapse( NactTreeView *view )
static gboolean
toggle_collapse_iter( NactTreeView *view, GtkTreeModel *model,
- GtkTreeIter *iter, NAObject *object, gpointer user_data )
+ GtkTreeIter *iter, FMAObject *object, gpointer user_data )
{
guint count;
guint *toggle;
toggle = ( guint * ) user_data;
- if( NA_IS_OBJECT_ITEM( object )){
+ if( FMA_IS_OBJECT_ITEM( object )){
GtkTreePath *path = gtk_tree_model_get_path( model, iter );
- count = na_object_get_items_count( object );
+ count = fma_object_get_items_count( object );
- if(( count > 1 && NA_IS_OBJECT_ACTION( object )) ||
- ( count > 0 && NA_IS_OBJECT_MENU( object ))){
+ if(( count > 1 && FMA_IS_OBJECT_ACTION( object )) ||
+ ( count > 0 && FMA_IS_OBJECT_MENU( object ))){
toggle_collapse_row( view->private->tree_view, path, toggle );
}
diff --git a/src/nact/nact-tree-view.h b/src/nact/nact-tree-view.h
index 650cd70..31d0e0f 100644
--- a/src/nact/nact-tree-view.h
+++ b/src/nact/nact-tree-view.h
@@ -47,7 +47,7 @@
* construction time.
*/
-#include "api/na-object-item.h"
+#include "api/fma-object-item.h"
#include "base-window.h"
#include "nact-main-window-def.h"
@@ -123,7 +123,7 @@ void nact_tree_view_set_notify_allowed( NactTreeView *view, gboolean al
void nact_tree_view_collapse_all ( const NactTreeView *view );
void nact_tree_view_expand_all ( const NactTreeView *view );
-NAObjectItem *nact_tree_view_get_item_by_id ( const NactTreeView *view, const gchar *id );
+FMAObjectItem *nact_tree_view_get_item_by_id ( const NactTreeView *view, const gchar *id );
GList *nact_tree_view_get_items ( const NactTreeView *view );
GList *nact_tree_view_get_items_ex ( const NactTreeView *view, guint mode );
diff --git a/src/plugin-menu/nautilus-actions.c b/src/plugin-menu/nautilus-actions.c
index 1e900c1..6a5fe8c 100644
--- a/src/plugin-menu/nautilus-actions.c
+++ b/src/plugin-menu/nautilus-actions.c
@@ -40,7 +40,7 @@
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/na-timeout.h>
#include <core/na-pivot.h>
@@ -86,17 +86,17 @@ static GList *menu_provider_get_toolbar_items( NautilusMenuProvider *
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 NAObjectItem *expand_tokens_item( const NAObjectItem *item, NATokens *tokens );
+static FMAObjectItem *expand_tokens_item( const FMAObjectItem *item, NATokens *tokens );
static void expand_tokens_context( FMAIContext *context, NATokens *tokens );
-static NAObjectProfile *get_candidate_profile( NAObjectAction *action, guint target, GList *files );
-static NautilusMenuItem *create_item_from_profile( NAObjectProfile *profile, guint target, GList *files,
NATokens *tokens );
-static NautilusMenuItem *create_item_from_menu( NAObjectMenu *menu, GList *subitems, guint target );
-static NautilusMenuItem *create_menu_item( const NAObjectItem *item, guint target );
+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_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 );
static void attach_submenu_to_item( NautilusMenuItem *item, GList *subitems );
-static void weak_notify_profile( NAObjectProfile *profile, NautilusMenuItem *item );
+static void weak_notify_profile( FMAObjectProfile *profile, NautilusMenuItem *item );
-static void execute_action( NautilusMenuItem *item, NAObjectProfile *profile );
+static void execute_action( NautilusMenuItem *item, FMAObjectProfile *profile );
static GList *create_root_menu( NautilusActions *plugin, GList *nautilus_menu );
static GList *add_about_item( NautilusActions *plugin, GList *nautilus_menu );
@@ -533,9 +533,9 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
GList *nautilus_menu;
GList *it;
GList *subitems;
- NAObjectItem *item;
+ FMAObjectItem *item;
GList *submenu;
- NAObjectProfile *profile;
+ FMAObjectProfile *profile;
NautilusMenuItem *menu_item;
gchar *label;
@@ -543,8 +543,8 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
for( it=tree ; it ; it=it->next ){
- g_return_val_if_fail( NA_IS_OBJECT_ITEM( it->data ), NULL );
- label = na_object_get_label( it->data );
+ g_return_val_if_fail( FMA_IS_OBJECT_ITEM( it->data ), NULL );
+ label = fma_object_get_label( it->data );
g_debug( "%s: examining %s", thisfn, label );
if( !fma_icontext_is_candidate( FMA_ICONTEXT( it->data ), target, selection )){
@@ -553,12 +553,12 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
continue;
}
- item = expand_tokens_item( NA_OBJECT_ITEM( it->data ), tokens );
+ item = expand_tokens_item( FMA_OBJECT_ITEM( it->data ), tokens );
/* but we have to re-check for validity as a label may become
- * dynamically empty - thus the NAObjectItem invalid :(
+ * dynamically empty - thus the FMAObjectItem invalid :(
*/
- if( !na_object_is_valid( item )){
+ if( !fma_object_is_valid( item )){
g_debug( "%s: item %s becomes invalid after tokens expansion", thisfn, label );
g_object_unref( item );
g_free( label );
@@ -569,9 +569,9 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
* the 'submenu' menu of nautilusMenuItem's is attached to the returned
* 'item'
*/
- if( NA_IS_OBJECT_MENU( it->data )){
+ if( FMA_IS_OBJECT_MENU( it->data )){
- subitems = na_object_get_items( NA_OBJECT( it->data ));
+ subitems = fma_object_get_items( FMA_OBJECT( it->data ));
g_debug( "%s: menu has %d items", thisfn, g_list_length( subitems ));
submenu = build_nautilus_menu_rec( subitems, target, selection, tokens );
@@ -582,7 +582,7 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
nautilus_menu = g_list_concat( nautilus_menu, submenu );
} else {
- menu_item = create_item_from_menu( NA_OBJECT_MENU( item ), submenu,
target );
+ menu_item = create_item_from_menu( FMA_OBJECT_MENU( item ), submenu,
target );
nautilus_menu = g_list_append( nautilus_menu, menu_item );
}
}
@@ -591,11 +591,11 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
continue;
}
- g_return_val_if_fail( NA_IS_OBJECT_ACTION( item ), NULL );
+ g_return_val_if_fail( FMA_IS_OBJECT_ACTION( item ), NULL );
/* if we have an action, searches for a candidate profile
*/
- profile = get_candidate_profile( NA_OBJECT_ACTION( item ), target, selection );
+ profile = get_candidate_profile( FMA_OBJECT_ACTION( item ), target, selection );
if( profile ){
menu_item = create_item_from_profile( profile, target, selection, tokens );
nautilus_menu = g_list_append( nautilus_menu, menu_item );
@@ -613,7 +613,7 @@ build_nautilus_menu_rec( GList *tree, guint target, GList *selection, NATokens *
/*
* expand_tokens_item:
- * @item: a NAObjectItem read from the NAPivot.
+ * @item: a FMAObjectItem read from the NAPivot.
* @tokens: the NATokens object which holds current selection data
* (uris, basenames, mimetypes, etc.)
*
@@ -625,46 +625,46 @@ 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 NAObjectItem *
-expand_tokens_item( const NAObjectItem *src, NATokens *tokens )
+static FMAObjectItem *
+expand_tokens_item( const FMAObjectItem *src, NATokens *tokens )
{
gchar *old, *new;
GSList *subitems_slist, *its, *new_slist;
GList *subitems, *it;
- NAObjectItem *item;
+ FMAObjectItem *item;
- item = NA_OBJECT_ITEM( na_object_duplicate( src, DUPLICATE_OBJECT ));
+ item = FMA_OBJECT_ITEM( fma_object_duplicate( src, DUPLICATE_OBJECT ));
/* label, tooltip and icon name
* plus the toolbar label if this is an action
*/
- old = na_object_get_label( item );
+ old = fma_object_get_label( item );
new = na_tokens_parse_for_display( tokens, old, TRUE );
- na_object_set_label( item, new );
+ fma_object_set_label( item, new );
g_free( old );
g_free( new );
- old = na_object_get_tooltip( item );
+ old = fma_object_get_tooltip( item );
new = na_tokens_parse_for_display( tokens, old, TRUE );
- na_object_set_tooltip( item, new );
+ fma_object_set_tooltip( item, new );
g_free( old );
g_free( new );
- old = na_object_get_icon( item );
+ old = fma_object_get_icon( item );
new = na_tokens_parse_for_display( tokens, old, TRUE );
- na_object_set_icon( item, new );
+ fma_object_set_icon( item, new );
g_free( old );
g_free( new );
- if( NA_IS_OBJECT_ACTION( item )){
- old = na_object_get_toolbar_label( item );
+ if( FMA_IS_OBJECT_ACTION( item )){
+ old = fma_object_get_toolbar_label( item );
new = na_tokens_parse_for_display( tokens, old, TRUE );
- na_object_set_toolbar_label( item, new );
+ fma_object_set_toolbar_label( item, new );
g_free( old );
g_free( new );
}
- /* A NAObjectItem, whether it is an action or a menu, is also a FMAIContext
+ /* A FMAObjectItem, whether it is an action or a menu, is also a FMAIContext
*/
expand_tokens_context( FMA_ICONTEXT( item ), tokens );
@@ -672,7 +672,7 @@ expand_tokens_item( const NAObjectItem *src, NATokens *tokens )
* or the items list of a menu, may be dynamic and embed a command;
* this command itself may embed parameters
*/
- subitems_slist = na_object_get_items_slist( item );
+ subitems_slist = fma_object_get_items_slist( item );
new_slist = NULL;
for( its = subitems_slist ; its ; its = its->next ){
old = ( gchar * ) its->data;
@@ -683,28 +683,28 @@ expand_tokens_item( const NAObjectItem *src, NATokens *tokens )
}
new_slist = g_slist_prepend( new_slist, new );
}
- na_object_set_items_slist( item, new_slist );
+ fma_object_set_items_slist( item, new_slist );
fma_core_utils_slist_free( subitems_slist );
fma_core_utils_slist_free( new_slist );
/* last, deal with profiles of an action
*/
- if( NA_IS_OBJECT_ACTION( item )){
+ if( FMA_IS_OBJECT_ACTION( item )){
- subitems = na_object_get_items( item );
+ subitems = fma_object_get_items( item );
for( it = subitems ; it ; it = it->next ){
/* desktop Exec key = GConf path+parameters
* do not touch them here
*/
- old = na_object_get_working_dir( it->data );
+ old = fma_object_get_working_dir( it->data );
new = na_tokens_parse_for_display( tokens, old, FALSE );
- na_object_set_working_dir( it->data, new );
+ fma_object_set_working_dir( it->data, new );
g_free( old );
g_free( new );
- /* a NAObjectProfile is also a FMAIContext
+ /* a FMAObjectProfile is also a FMAIContext
*/
expand_tokens_context( FMA_ICONTEXT( it->data ), tokens );
}
@@ -718,51 +718,51 @@ expand_tokens_context( FMAIContext *context, NATokens *tokens )
{
gchar *old, *new;
- old = na_object_get_try_exec( context );
+ old = fma_object_get_try_exec( context );
new = na_tokens_parse_for_display( tokens, old, FALSE );
- na_object_set_try_exec( context, new );
+ fma_object_set_try_exec( context, new );
g_free( old );
g_free( new );
- old = na_object_get_show_if_registered( context );
+ old = fma_object_get_show_if_registered( context );
new = na_tokens_parse_for_display( tokens, old, FALSE );
- na_object_set_show_if_registered( context, new );
+ fma_object_set_show_if_registered( context, new );
g_free( old );
g_free( new );
- old = na_object_get_show_if_true( context );
+ old = fma_object_get_show_if_true( context );
new = na_tokens_parse_for_display( tokens, old, FALSE );
- na_object_set_show_if_true( context, new );
+ fma_object_set_show_if_true( context, new );
g_free( old );
g_free( new );
- old = na_object_get_show_if_running( context );
+ old = fma_object_get_show_if_running( context );
new = na_tokens_parse_for_display( tokens, old, FALSE );
- na_object_set_show_if_running( context, new );
+ fma_object_set_show_if_running( context, new );
g_free( old );
g_free( new );
}
/*
- * could also be a NAObjectAction method - but this is not used elsewhere
+ * could also be a FMAObjectAction method - but this is not used elsewhere
*/
-static NAObjectProfile *
-get_candidate_profile( NAObjectAction *action, guint target, GList *files )
+static FMAObjectProfile *
+get_candidate_profile( FMAObjectAction *action, guint target, GList *files )
{
static const gchar *thisfn = "nautilus_actions_get_candidate_profile";
- NAObjectProfile *candidate = NULL;
+ FMAObjectProfile *candidate = NULL;
gchar *action_label;
gchar *profile_label;
GList *profiles, *ip;
- action_label = na_object_get_label( action );
- profiles = na_object_get_items( action );
+ action_label = fma_object_get_label( action );
+ profiles = fma_object_get_items( action );
for( ip = profiles ; ip && !candidate ; ip = ip->next ){
- NAObjectProfile *profile = NA_OBJECT_PROFILE( ip->data );
+ FMAObjectProfile *profile = FMA_OBJECT_PROFILE( ip->data );
if( fma_icontext_is_candidate( FMA_ICONTEXT( profile ), target, files )){
- profile_label = na_object_get_label( profile );
+ profile_label = fma_object_get_label( profile );
g_debug( "%s: selecting %s (profile=%p '%s')", thisfn, action_label, ( void * )
profile, profile_label );
g_free( profile_label );
@@ -776,17 +776,17 @@ get_candidate_profile( NAObjectAction *action, guint target, GList *files )
}
static NautilusMenuItem *
-create_item_from_profile( NAObjectProfile *profile, guint target, GList *files, NATokens *tokens )
+create_item_from_profile( FMAObjectProfile *profile, guint target, GList *files, NATokens *tokens )
{
NautilusMenuItem *item;
- NAObjectAction *action;
- NAObjectProfile *duplicate;
+ FMAObjectAction *action;
+ FMAObjectProfile *duplicate;
- action = NA_OBJECT_ACTION( na_object_get_parent( profile ));
- duplicate = NA_OBJECT_PROFILE( na_object_duplicate( profile, DUPLICATE_ONLY ));
- na_object_set_parent( duplicate, NULL );
+ action = FMA_OBJECT_ACTION( fma_object_get_parent( profile ));
+ duplicate = FMA_OBJECT_PROFILE( fma_object_duplicate( profile, DUPLICATE_ONLY ));
+ fma_object_set_parent( duplicate, NULL );
- item = create_menu_item( NA_OBJECT_ITEM( action ), target );
+ item = create_menu_item( FMA_OBJECT_ITEM( action ), target );
g_signal_connect( item,
"activate",
@@ -809,7 +809,7 @@ create_item_from_profile( NAObjectProfile *profile, guint target, GList *files,
* called _after_ the NautilusMenuItem has been finalized
*/
static void
-weak_notify_profile( NAObjectProfile *profile, NautilusMenuItem *item )
+weak_notify_profile( FMAObjectProfile *profile, NautilusMenuItem *item )
{
g_debug( "nautilus_actions_weak_notify_profile: profile=%p (ref_count=%d)",
( void * ) profile, G_OBJECT( profile )->ref_count );
@@ -823,12 +823,12 @@ weak_notify_profile( NAObjectProfile *profile, NautilusMenuItem *item )
* the submenu
*/
static NautilusMenuItem *
-create_item_from_menu( NAObjectMenu *menu, GList *subitems, guint target )
+create_item_from_menu( FMAObjectMenu *menu, GList *subitems, guint target )
{
/*static const gchar *thisfn = "nautilus_actions_create_item_from_menu";*/
NautilusMenuItem *item;
- item = create_menu_item( NA_OBJECT_ITEM( menu ), target );
+ item = create_menu_item( FMA_OBJECT_ITEM( menu ), target );
attach_submenu_to_item( item, subitems );
@@ -845,16 +845,16 @@ create_item_from_menu( NAObjectMenu *menu, GList *subitems, guint target )
* to check for instanciation/finalization cycles
*/
static NautilusMenuItem *
-create_menu_item( const NAObjectItem *item, guint target )
+create_menu_item( const FMAObjectItem *item, guint target )
{
NautilusMenuItem *menu_item;
gchar *id, *name, *label, *tooltip, *icon;
- id = na_object_get_id( item );
+ id = fma_object_get_id( item );
name = g_strdup_printf( "%s-%s-%s-%d", PACKAGE, G_OBJECT_TYPE_NAME( item ), id, target );
- label = na_object_get_label( item );
- tooltip = na_object_get_tooltip( item );
- icon = na_object_get_icon( item );
+ label = fma_object_get_label( item );
+ tooltip = fma_object_get_tooltip( item );
+ icon = fma_object_get_icon( item );
menu_item = nautilus_menu_item_new( name, label, tooltip, icon );
@@ -901,7 +901,7 @@ attach_submenu_to_item( NautilusMenuItem *item, GList *subitems )
* the current item of the selection
*/
static void
-execute_action( NautilusMenuItem *item, NAObjectProfile *profile )
+execute_action( NautilusMenuItem *item, FMAObjectProfile *profile )
{
static const gchar *thisfn = "nautilus_actions_execute_action";
NATokens *tokens;
diff --git a/src/test/test-reader.c b/src/test/test-reader.c
index 87014eb..c43392c 100755
--- a/src/test/test-reader.c
+++ b/src/test/test-reader.c
@@ -88,7 +88,7 @@ main( int argc, char **argv )
result = import_results->data;
if( result->imported ){
- na_object_dump( result->imported );
+ fma_object_dump( result->imported );
g_object_unref( result->imported );
}
diff --git a/src/utils/na-print-schemas.c b/src/utils/na-print-schemas.c
index 3f3ef4a..c561edc 100644
--- a/src/utils/na-print-schemas.c
+++ b/src/utils/na-print-schemas.c
@@ -49,9 +49,9 @@
#include "console-utils.h"
-extern FMADataGroup menu_data_groups[]; /* defined in
na-object-menu-factory.c */
-extern FMADataGroup action_data_groups[]; /* defined in na-object-action-factory.c */
-extern FMADataGroup profile_data_groups[]; /* defined in na-object-profile-factory.c */
+extern FMADataGroup menu_data_groups[]; /* defined in
fma-object-menu-factory.c */
+extern FMADataGroup action_data_groups[]; /* defined in fma-object-action-factory.c */
+extern FMADataGroup profile_data_groups[]; /* defined in fma-object-profile-factory.c */
static gboolean output_action = FALSE;
static gboolean output_menu = FALSE;
diff --git a/src/utils/nautilus-actions-new.c b/src/utils/nautilus-actions-new.c
index ebd3b1d..b4564fb 100644
--- a/src/utils/nautilus-actions-new.c
+++ b/src/utils/nautilus-actions-new.c
@@ -40,7 +40,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-iio-provider.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <core/na-gconf-migration.h>
#include <core/na-io-provider.h>
@@ -95,8 +95,8 @@ static gboolean output_desktop = FALSE;
/* misc entries */
static gboolean version = FALSE;
-extern FMADataGroup action_data_groups[]; /* defined in na-object-action-factory.c */
-extern FMADataGroup profile_data_groups[]; /* defined in na-object-profile-factory.c */
+extern FMADataGroup action_data_groups[]; /* defined in fma-object-action-factory.c */
+extern FMADataGroup profile_data_groups[]; /* defined in fma-object-profile-factory.c */
static const ArgFromDataDef st_arg_from_data_def[] = {
{ action_data_groups, FMA_FACTORY_OBJECT_ITEM_GROUP, FMAFO_DATA_LABEL,
&label },
@@ -163,9 +163,9 @@ static GOptionEntry misc_entries[] = {
static GOptionEntry *build_option_entries( const ArgFromDataDef *defs, guint nbdefs, const GOptionEntry
*adds, guint nbadds );
static GOptionContext *init_options( void );
-static NAObjectAction *get_action_from_cmdline( void );
-static gboolean output_to_desktop( NAObjectAction *action, GSList **msgs );
-static gboolean output_to_stdout( const NAObjectAction *action, GSList **msgs );
+static FMAObjectAction *get_action_from_cmdline( void );
+static gboolean output_to_desktop( FMAObjectAction *action, GSList **msgs );
+static gboolean output_to_stdout( const FMAObjectAction *action, GSList **msgs );
static void exit_with_usage( void );
int
@@ -174,7 +174,7 @@ main( int argc, char** argv )
int status = EXIT_SUCCESS;
GOptionContext *context;
GError *error = NULL;
- NAObjectAction *action;
+ FMAObjectAction *action;
GSList *msg = NULL;
GSList *im;
gchar *help;
@@ -395,11 +395,11 @@ init_options( void )
/*
* allocate a new action, and fill it with values read from command-line
*/
-static NAObjectAction *
+static FMAObjectAction *
get_action_from_cmdline( void )
{
- NAObjectAction *action;
- NAObjectProfile *profile;
+ FMAObjectAction *action;
+ FMAObjectProfile *profile;
int i;
GSList *basenames;
GSList *mimetypes;
@@ -411,32 +411,32 @@ get_action_from_cmdline( void )
GSList *not_show_in;
GSList *capabilities;
- action = na_object_action_new_with_defaults();
- profile = NA_OBJECT_PROFILE(( GList * ) na_object_get_items( action )->data );
+ action = fma_object_action_new_with_defaults();
+ profile = FMA_OBJECT_PROFILE(( GList * ) fma_object_get_items( action )->data );
- na_object_set_label( action, label );
+ fma_object_set_label( action, label );
if( tooltip && g_utf8_strlen( tooltip, -1 )){
- na_object_set_tooltip( action, tooltip );
+ fma_object_set_tooltip( action, tooltip );
}
if( icon && g_utf8_strlen( icon, -1 )){
- na_object_set_icon( action, icon );
+ fma_object_set_icon( action, icon );
}
- na_object_set_enabled( action, enabled );
- na_object_set_target_selection( action, target_selection );
- na_object_set_target_location( action, target_location );
- na_object_set_target_toolbar( action, target_toolbar );
+ fma_object_set_enabled( action, enabled );
+ fma_object_set_target_selection( action, target_selection );
+ fma_object_set_target_location( action, target_location );
+ fma_object_set_target_toolbar( action, target_toolbar );
toolbar_same_label = FALSE;
if( !label_toolbar || !g_utf8_strlen( label_toolbar, -1 )){
label_toolbar = g_strdup( label );
toolbar_same_label = TRUE;
}
- na_object_set_toolbar_same_label( action, toolbar_same_label );
- na_object_set_toolbar_label( action, label_toolbar );
+ fma_object_set_toolbar_same_label( action, toolbar_same_label );
+ fma_object_set_toolbar_label( action, label_toolbar );
- na_object_set_path( profile, command );
- na_object_set_parameters( profile, parameters );
- na_object_set_working_dir( profile, workingdir );
+ fma_object_set_path( profile, command );
+ fma_object_set_parameters( profile, parameters );
+ fma_object_set_working_dir( profile, workingdir );
i = 0;
basenames = NULL;
@@ -445,11 +445,11 @@ get_action_from_cmdline( void )
i++;
}
if( basenames && g_slist_length( basenames )){
- na_object_set_basenames( profile, basenames );
+ fma_object_set_basenames( profile, basenames );
fma_core_utils_slist_free( basenames );
}
- na_object_set_matchcase( profile, matchcase );
+ fma_object_set_matchcase( profile, matchcase );
mimetypes = NULL;
if( isfile ){
@@ -473,7 +473,7 @@ get_action_from_cmdline( void )
i++;
}
if( mimetypes && g_slist_length( mimetypes )){
- na_object_set_mimetypes( profile, mimetypes );
+ fma_object_set_mimetypes( profile, mimetypes );
fma_core_utils_slist_free( mimetypes );
}
@@ -484,7 +484,7 @@ get_action_from_cmdline( void )
selection_count = g_strdup( ">0" );
}
if( strlen( selection_count )){
- na_object_set_selection_count( profile, selection_count );
+ fma_object_set_selection_count( profile, selection_count );
}
i = 0;
@@ -494,7 +494,7 @@ get_action_from_cmdline( void )
i++;
}
if( schemes && g_slist_length( schemes )){
- na_object_set_schemes( profile, schemes );
+ fma_object_set_schemes( profile, schemes );
fma_core_utils_slist_free( schemes );
}
@@ -505,7 +505,7 @@ get_action_from_cmdline( void )
i++;
}
if( folders && g_slist_length( folders )){
- na_object_set_folders( profile, folders );
+ fma_object_set_folders( profile, folders );
fma_core_utils_slist_free( folders );
}
@@ -515,7 +515,7 @@ get_action_from_cmdline( void )
only_show_in = g_slist_append( only_show_in, g_strdup( onlyshow_array[i] ));
}
if( only_show_in && g_slist_length( only_show_in )){
- na_object_set_only_show_in( profile, only_show_in );
+ fma_object_set_only_show_in( profile, only_show_in );
fma_core_utils_slist_free( only_show_in );
}
}
@@ -526,25 +526,25 @@ get_action_from_cmdline( void )
not_show_in = g_slist_append( not_show_in, g_strdup( notshow_array[i] ));
}
if( not_show_in && g_slist_length( not_show_in )){
- na_object_set_not_show_in( profile, not_show_in );
+ fma_object_set_not_show_in( profile, not_show_in );
fma_core_utils_slist_free( not_show_in );
}
}
if( try_exec && strlen( try_exec )){
- na_object_set_try_exec( profile, try_exec );
+ fma_object_set_try_exec( profile, try_exec );
}
if( show_registered && strlen( show_registered )){
- na_object_set_show_if_registered( profile, show_registered );
+ fma_object_set_show_if_registered( profile, show_registered );
}
if( show_true && strlen( show_true )){
- na_object_set_show_if_true( profile, show_true );
+ fma_object_set_show_if_true( profile, show_true );
}
if( show_running && strlen( show_running )){
- na_object_set_show_if_running( profile, show_running );
+ fma_object_set_show_if_running( profile, show_running );
}
if( capability_array ){
@@ -563,7 +563,7 @@ get_action_from_cmdline( void )
}
}
if( capabilities && g_slist_length( capabilities )){
- na_object_set_capabilities( profile, capabilities );
+ fma_object_set_capabilities( profile, capabilities );
fma_core_utils_slist_free( capabilities );
}
}
@@ -575,7 +575,7 @@ get_action_from_cmdline( void )
* write the new item as a .desktop file
*/
static gboolean
-output_to_desktop( NAObjectAction *action, GSList **msgs )
+output_to_desktop( FMAObjectAction *action, GSList **msgs )
{
NAUpdater *updater;
NAIOProvider *provider;
@@ -586,8 +586,8 @@ output_to_desktop( NAObjectAction *action, GSList **msgs )
provider = na_io_provider_find_io_provider_by_id( NA_PIVOT( updater ), "na-desktop" );
if( provider ){
- na_object_set_provider( action, provider );
- ret = na_updater_write_item( updater, NA_OBJECT_ITEM( action ), msgs );
+ fma_object_set_provider( action, provider );
+ ret = na_updater_write_item( updater, FMA_OBJECT_ITEM( action ), msgs );
code = ( ret == FMA_IIO_PROVIDER_CODE_OK );
} else {
@@ -602,14 +602,14 @@ output_to_desktop( NAObjectAction *action, GSList **msgs )
}
static gboolean
-output_to_stdout( const NAObjectAction *action, GSList **msgs )
+output_to_stdout( const FMAObjectAction *action, GSList **msgs )
{
gboolean ret;
NAUpdater *updater;
gchar *buffer;
updater = na_updater_new();
- buffer = na_exporter_to_buffer( NA_PIVOT( updater ), NA_OBJECT_ITEM( action ), "Desktop1", msgs );
+ buffer = na_exporter_to_buffer( NA_PIVOT( updater ), FMA_OBJECT_ITEM( action ), "Desktop1", msgs );
ret = ( buffer != NULL );
if( buffer ){
diff --git a/src/utils/nautilus-actions-print.c b/src/utils/nautilus-actions-print.c
index 4ed8618..d49a228 100644
--- a/src/utils/nautilus-actions-print.c
+++ b/src/utils/nautilus-actions-print.c
@@ -39,7 +39,7 @@
#include <string.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <core/na-exporter.h>
#include <core/na-export-format.h>
@@ -74,8 +74,8 @@ static GOptionEntry misc_entries[] = {
static NAPivot *pivot = NULL;
static GOptionContext *init_options( void );
-static NAObjectItem *get_item( const gchar *id );
-static void export_item( const NAObjectItem *item, const gchar *format );
+static FMAObjectItem *get_item( const gchar *id );
+static void export_item( const FMAObjectItem *item, const gchar *format );
static void exit_with_usage( void );
int
@@ -86,7 +86,7 @@ main( int argc, char** argv )
GError *error = NULL;
gchar *help;
gint errors;
- NAObjectItem *item;
+ FMAObjectItem *item;
FMAIExporter *exporter;
#if !GLIB_CHECK_VERSION( 2,36, 0 )
@@ -191,10 +191,10 @@ init_options( void )
/*
* search for the action in the repository
*/
-static NAObjectItem *
+static FMAObjectItem *
get_item( const gchar *id )
{
- NAObjectItem *item = NULL;
+ FMAObjectItem *item = NULL;
pivot = na_pivot_new();
na_pivot_set_loadable( pivot, PIVOT_LOAD_ALL );
@@ -213,7 +213,7 @@ get_item( const gchar *id )
* displays the specified item on stdout, in the specified export format
*/
static void
-export_item( const NAObjectItem *item, const gchar *format )
+export_item( const FMAObjectItem *item, const gchar *format )
{
GSList *messages = NULL;
GSList *it;
diff --git a/src/utils/nautilus-actions-run.c b/src/utils/nautilus-actions-run.c
index daa50e6..ea64fc3 100644
--- a/src/utils/nautilus-actions-run.c
+++ b/src/utils/nautilus-actions-run.c
@@ -38,7 +38,7 @@
#include <string.h>
#include <api/fma-core-utils.h>
-#include <api/na-object-api.h>
+#include <api/fma-object-api.h>
#include <api/fma-dbus.h>
#include <core/na-gconf-migration.h>
@@ -70,12 +70,12 @@ static GOptionEntry misc_entries[] = {
};
static GOptionContext *init_options( void );
-static NAObjectAction *get_action( const gchar *id );
+static FMAObjectAction *get_action( const gchar *id );
static GList *targets_from_selection( void );
static GList *targets_from_commandline( void );
static GList *get_selection_from_strv( const gchar **strv, gboolean has_mimetype );
-static NAObjectProfile *get_profile_for_targets( NAObjectAction *action, GList *targets );
-static void execute_action( NAObjectAction *action, NAObjectProfile *profile, GList *targets );
+static FMAObjectProfile *get_profile_for_targets( FMAObjectAction *action, GList *targets );
+static void execute_action( FMAObjectAction *action, FMAObjectProfile *profile, GList *targets );
static void dump_targets( GList *targets );
static void exit_with_usage( void );
@@ -88,8 +88,8 @@ main( int argc, char** argv )
GError *error = NULL;
gchar *help;
gint errors;
- NAObjectAction *action;
- NAObjectProfile *profile;
+ FMAObjectAction *action;
+ FMAObjectProfile *profile;
GList *targets;
#if !GLIB_CHECK_VERSION( 2,36, 0 )
@@ -218,11 +218,11 @@ init_options( void )
/*
* search for the action in the repository
*/
-static NAObjectAction *
+static FMAObjectAction *
get_action( const gchar *id )
{
NAPivot *pivot;
- NAObjectAction *action;
+ FMAObjectAction *action;
action = NULL;
@@ -230,18 +230,18 @@ get_action( const gchar *id )
na_pivot_set_loadable( pivot, !PIVOT_LOAD_DISABLED & !PIVOT_LOAD_INVALID );
na_pivot_load_items( pivot );
- action = ( NAObjectAction * ) na_pivot_get_item( pivot, id );
+ action = ( FMAObjectAction * ) na_pivot_get_item( pivot, id );
if( !action ){
g_printerr( _( "Error: action '%s' doesn't exist.\n" ), id );
} else {
- if( !na_object_is_enabled( action )){
+ if( !fma_object_is_enabled( action )){
g_printerr( _( "Error: action '%s' is disabled.\n" ), id );
g_object_unref( action );
action = NULL;
}
- if( !na_object_is_valid( action )){
+ if( !fma_object_is_valid( action )){
g_printerr( _( "Error: action '%s' is not valid.\n" ), id );
g_object_unref( action );
action = NULL;
@@ -381,19 +381,19 @@ get_selection_from_strv( const gchar **strv, gboolean has_mimetype )
/*
* find a profile candidate to be executed for the given uris
*/
-static NAObjectProfile *
-get_profile_for_targets( NAObjectAction *action, GList *targets )
+static FMAObjectProfile *
+get_profile_for_targets( FMAObjectAction *action, GList *targets )
{
/*static const gchar *thisfn = "nautilus_actions_run_get_profile_for_targets";*/
GList *profiles, *ip;
- NAObjectProfile *candidate;
+ FMAObjectProfile *candidate;
candidate = NULL;
- profiles = na_object_get_items( action );
+ profiles = fma_object_get_items( action );
for( ip = profiles ; ip && !candidate ; ip = ip->next ){
if( fma_icontext_is_candidate( FMA_ICONTEXT( ip->data ), ITEM_TARGET_ANY, targets )){
- candidate = NA_OBJECT_PROFILE( ip->data );
+ candidate = FMA_OBJECT_PROFILE( ip->data );
}
}
@@ -401,7 +401,7 @@ get_profile_for_targets( NAObjectAction *action, GList *targets )
}
static void
-execute_action( NAObjectAction *action, NAObjectProfile *profile, GList *targets )
+execute_action( FMAObjectAction *action, FMAObjectProfile *profile, GList *targets )
{
/*static const gchar *thisfn = "nautilus_action_run_execute_action";*/
NATokens *tokens;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]