[nautilus-actions/file-manager-actions] NadpMonitor class is renamed to FMAMonitor
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NadpMonitor class is renamed to FMAMonitor
- Date: Tue, 8 Sep 2015 14:46:18 +0000 (UTC)
commit 0b8131681284f37cbdbbaf0ebee6e451099c4449
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 14:54:50 2015 +0200
NadpMonitor class is renamed to FMAMonitor
src/io-desktop/Makefile.am | 10 ++--
src/io-desktop/fma-desktop-file.c | 24 ++++----
src/io-desktop/fma-desktop-provider.c | 8 +-
src/io-desktop/fma-formats.h | 6 +-
src/io-desktop/fma-keys.c | 2 +-
src/io-desktop/fma-keys.h | 54 ++++++++--------
src/io-desktop/fma-module.c | 16 ++--
src/io-desktop/{nadp-monitor.c => fma-monitor.c} | 78 +++++++++++-----------
src/io-desktop/{nadp-monitor.h => fma-monitor.h} | 44 ++++++------
src/io-desktop/nadp-reader.c | 14 ++--
src/io-desktop/nadp-writer.c | 16 ++--
11 files changed, 136 insertions(+), 136 deletions(-)
---
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index 802761b..de7dd8f 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -47,11 +47,11 @@ libna_io_desktop_la_SOURCES = \
fma-desktop-provider.h \
fma-formats.c \
fma-formats.h \
- nadp-keys.c \
- nadp-keys.h \
- nadp-module.c \
- nadp-monitor.c \
- nadp-monitor.h \
+ fma-keys.c \
+ fma-keys.h \
+ fma-module.c \
+ fma-monitor.c \
+ fma-monitor.h \
nadp-reader.c \
nadp-reader.h \
nadp-utils.c \
diff --git a/src/io-desktop/fma-desktop-file.c b/src/io-desktop/fma-desktop-file.c
index 31971f5..7ae79c2 100644
--- a/src/io-desktop/fma-desktop-file.c
+++ b/src/io-desktop/fma-desktop-file.c
@@ -38,7 +38,7 @@
#include <api/fma-core-utils.h>
#include "fma-desktop-file.h"
-#include "nadp-keys.h"
+#include "fma-keys.h"
/* private class data
*/
@@ -458,21 +458,21 @@ check_key_file( FMADesktopFile *ndf )
/* start group must be [Desktop Entry] */
start_group = g_key_file_get_start_group( ndf->private->key_file );
- if( strcmp( start_group, NADP_GROUP_DESKTOP )){
+ if( strcmp( start_group, FMA_GROUP_DESKTOP )){
g_debug( "%s: %s: invalid start group, found %s, waited for %s",
- thisfn, ndf->private->uri, start_group, NADP_GROUP_DESKTOP );
+ thisfn, ndf->private->uri, start_group, FMA_GROUP_DESKTOP );
ret = FALSE;
}
/* must not have Hidden=true value */
if( ret ){
- has_key = g_key_file_has_key( ndf->private->key_file, start_group, NADP_KEY_HIDDEN, &error );
+ has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_KEY_HIDDEN, &error );
if( error ){
g_debug( "%s: %s: %s", thisfn, ndf->private->uri, error->message );
ret = FALSE;
} else if( has_key ){
- hidden = g_key_file_get_boolean( ndf->private->key_file, start_group,
NADP_KEY_HIDDEN, &error );
+ hidden = g_key_file_get_boolean( ndf->private->key_file, start_group, FMA_KEY_HIDDEN,
&error );
if( error ){
g_debug( "%s: %s: %s", thisfn, ndf->private->uri, error->message );
ret = FALSE;
@@ -489,14 +489,14 @@ check_key_file( FMADesktopFile *ndf )
*/
if( ret ){
type = NULL;
- has_key = g_key_file_has_key( ndf->private->key_file, start_group, NADP_KEY_TYPE, &error );
+ has_key = g_key_file_has_key( ndf->private->key_file, start_group, FMA_KEY_TYPE, &error );
if( error ){
g_debug( "%s: %s", thisfn, error->message );
g_error_free( error );
ret = FALSE;
} else if( has_key ){
- type = g_key_file_get_string( ndf->private->key_file, start_group, NADP_KEY_TYPE,
&error );
+ type = g_key_file_get_string( ndf->private->key_file, start_group, FMA_KEY_TYPE,
&error );
if( error ){
g_debug( "%s: %s", thisfn, error->message );
g_free( type );
@@ -506,9 +506,9 @@ check_key_file( FMADesktopFile *ndf )
}
if( ret ){
if( !type || !strlen( type )){
- type = g_strdup( NADP_VALUE_TYPE_ACTION );
+ type = g_strdup( FMA_VALUE_TYPE_ACTION );
- } else if( strcmp( type, NADP_VALUE_TYPE_MENU ) && strcmp( type,
NADP_VALUE_TYPE_ACTION )){
+ } else if( strcmp( type, FMA_VALUE_TYPE_MENU ) && strcmp( type, FMA_VALUE_TYPE_ACTION
)){
g_debug( "%s: unmanaged type: %s", thisfn, type );
g_free( type );
ret = FALSE;
@@ -600,7 +600,7 @@ fma_desktop_file_get_profiles( const FMADesktopFile *ndf )
groups = g_key_file_get_groups( ndf->private->key_file, NULL );
if( groups ){
ig = groups;
- profile_pfx = g_strdup_printf( "%s ", NADP_GROUP_PROFILE );
+ profile_pfx = g_strdup_printf( "%s ", FMA_GROUP_PROFILE );
pfx_len = strlen( profile_pfx );
while( *ig ){
@@ -643,7 +643,7 @@ fma_desktop_file_has_profile( const FMADesktopFile *ndf, const gchar *profile_id
if( !ndf->private->dispose_has_run ){
- group_name = g_strdup_printf( "%s %s", NADP_GROUP_PROFILE, profile_id );
+ group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
has_profile = g_key_file_has_group( ndf->private->key_file, group_name );
g_free( group_name );
}
@@ -708,7 +708,7 @@ fma_desktop_file_remove_profile( const FMADesktopFile *ndf, const gchar *profile
if( !ndf->private->dispose_has_run ){
- group_name = g_strdup_printf( "%s %s", NADP_GROUP_PROFILE, profile_id );
+ group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
g_key_file_remove_group( ndf->private->key_file, group_name, NULL );
g_free( group_name );
}
diff --git a/src/io-desktop/fma-desktop-provider.c b/src/io-desktop/fma-desktop-provider.c
index b3b7b23..ae81913 100644
--- a/src/io-desktop/fma-desktop-provider.c
+++ b/src/io-desktop/fma-desktop-provider.c
@@ -39,8 +39,8 @@
#include "fma-desktop-provider.h"
#include "fma-formats.h"
-#include "nadp-keys.h"
-#include "nadp-monitor.h"
+#include "fma-keys.h"
+#include "fma-monitor.h"
#include "nadp-reader.h"
#include "nadp-writer.h"
@@ -347,13 +347,13 @@ iexporter_free_formats( const FMAIExporter *exporter, GList *format_list )
void
fma_desktop_provider_add_monitor( FMADesktopProvider *provider, const gchar *dir )
{
- NadpMonitor *monitor;
+ FMAMonitor *monitor;
g_return_if_fail( FMA_IS_DESKTOP_PROVIDER( provider ));
if( !provider->private->dispose_has_run ){
- monitor = nadp_monitor_new( provider, dir );
+ monitor = fma_monitor_new( provider, dir );
provider->private->monitors = g_list_prepend( provider->private->monitors, monitor );
}
}
diff --git a/src/io-desktop/fma-formats.h b/src/io-desktop/fma-formats.h
index 62a8f76..ab3bb6c 100644
--- a/src/io-desktop/fma-formats.h
+++ b/src/io-desktop/fma-formats.h
@@ -27,8 +27,8 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __FMA_FORMATS_H__
-#define __FMA_FORMATS_H__
+#ifndef __IO_DESKTOP_FMA_FORMATS_H__
+#define __IO_DESKTOP_FMA_FORMATS_H__
#include <glib.h>
@@ -43,4 +43,4 @@ void fma_formats_free_formats( GList *formats );
G_END_DECLS
-#endif /* __FMA_FORMATS_H__ */
+#endif /* __IO_DESKTOP_FMA_FORMATS_H__ */
diff --git a/src/io-desktop/fma-keys.c b/src/io-desktop/fma-keys.c
index dad6d37..078b034 100644
--- a/src/io-desktop/fma-keys.c
+++ b/src/io-desktop/fma-keys.c
@@ -31,4 +31,4 @@
#include <config.h>
#endif
-#include "nadp-keys.h"
+#include "fma-keys.h"
diff --git a/src/io-desktop/fma-keys.h b/src/io-desktop/fma-keys.h
index e7f310d..79ab271 100644
--- a/src/io-desktop/fma-keys.h
+++ b/src/io-desktop/fma-keys.h
@@ -27,43 +27,43 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __NADP_KEYS_H__
-#define __NADP_KEYS_H__
+#ifndef __IO_DESKTOP_FMA_KEYS_H__
+#define __IO_DESKTOP_FMA_KEYS_H__
#include <api/fma-data-def.h>
G_BEGIN_DECLS
-#define NADP_GROUP_DESKTOP G_KEY_FILE_DESKTOP_GROUP
-#define NADP_GROUP_PROFILE "X-Action-Profile"
+#define FMA_GROUP_DESKTOP G_KEY_FILE_DESKTOP_GROUP
+#define FMA_GROUP_PROFILE "X-Action-Profile"
-#define NADP_KEY_TYPE G_KEY_FILE_DESKTOP_KEY_TYPE
-#define NADP_VALUE_TYPE_ACTION "Action"
-#define NADP_VALUE_TYPE_MENU "Menu"
+#define FMA_KEY_TYPE G_KEY_FILE_DESKTOP_KEY_TYPE
+#define FMA_VALUE_TYPE_ACTION "Action"
+#define FMA_VALUE_TYPE_MENU "Menu"
-#define NADP_KEY_PROFILES "Profiles"
+#define FMA_KEY_PROFILES "Profiles"
-#define NADP_KEY_EXECUTION_MODE "ExecutionMode"
-#define NADP_VALUE_EXECUTION_MODE_NORMAL "Normal"
-#define NADP_VALUE_EXECUTION_MODE_MINIMIZED "Minimized"
-#define NADP_VALUE_EXECUTION_MODE_MAXIMIZED "Maximized"
-#define NADP_VALUE_EXECUTION_MODE_TERMINAL "Terminal"
-#define NADP_VALUE_EXECUTION_MODE_EMBEDDED "Embedded"
-#define NADP_VALUE_EXECUTION_MODE_DISPLAY_OUTPUT "DisplayOutput"
+#define FMA_KEY_EXECUTION_MODE "ExecutionMode"
+#define FMA_VALUE_EXECUTION_MODE_NORMAL "Normal"
+#define FMA_VALUE_EXECUTION_MODE_MINIMIZED "Minimized"
+#define FMA_VALUE_EXECUTION_MODE_MAXIMIZED "Maximized"
+#define FMA_VALUE_EXECUTION_MODE_TERMINAL "Terminal"
+#define FMA_VALUE_EXECUTION_MODE_EMBEDDED "Embedded"
+#define FMA_VALUE_EXECUTION_MODE_DISPLAY_OUTPUT "DisplayOutput"
-#define NADP_KEY_ITEMS_LIST "ItemsList"
+#define FMA_KEY_ITEMS_LIST "ItemsList"
-#define NADP_KEY_ONLY_SHOW_IN G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN
-#define NADP_KEY_NOT_SHOW_IN G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN
-#define NADP_KEY_NO_DISPLAY "NoDisplay"
-#define NADP_KEY_HIDDEN
G_KEY_FILE_DESKTOP_KEY_HIDDEN
-#define NADP_KEY_CAPABILITIES "Capabilities"
-#define NADP_VALUE_CAPABILITY_OWNER "Owner"
-#define NADP_VALUE_CAPABILITY_READABLE "Readable"
-#define NADP_VALUE_CAPABILITY_WRITABLE "Writable"
-#define NADP_VALUE_CAPABILITY_EXECUTABLE "Executable"
-#define NADP_VALUE_CAPABILITY_LOCAL "Local"
+#define FMA_KEY_ONLY_SHOW_IN G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN
+#define FMA_KEY_NOT_SHOW_IN
G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN
+#define FMA_KEY_NO_DISPLAY "NoDisplay"
+#define FMA_KEY_HIDDEN G_KEY_FILE_DESKTOP_KEY_HIDDEN
+#define FMA_KEY_CAPABILITIES "Capabilities"
+#define FMA_VALUE_CAPABILITY_OWNER "Owner"
+#define FMA_VALUE_CAPABILITY_READABLE "Readable"
+#define FMA_VALUE_CAPABILITY_WRITABLE "Writable"
+#define FMA_VALUE_CAPABILITY_EXECUTABLE "Executable"
+#define FMA_VALUE_CAPABILITY_LOCAL "Local"
G_END_DECLS
-#endif /* __NADP_KEYS_H__ */
+#endif /* __IO_DESKTOP_FMA_KEYS_H__ */
diff --git a/src/io-desktop/fma-module.c b/src/io-desktop/fma-module.c
index 58f46a8..b682237 100644
--- a/src/io-desktop/fma-module.c
+++ b/src/io-desktop/fma-module.c
@@ -40,7 +40,7 @@
* - be registered in fma_extension_startup()
* - be addressed in fma_extension_list_types().
*/
-#define NADP_TYPES_COUNT 1
+#define FMA_TYPES_COUNT 1
/*
* fma_extension_startup:
@@ -50,7 +50,7 @@
gboolean
fma_extension_startup( GTypeModule *module )
{
- static const gchar *thisfn = "nadp_module_fma_extension_startup";
+ static const gchar *thisfn = "io-desktop/fma_module_fma_extension_startup";
g_debug( "%s: module=%p", thisfn, ( void * ) module );
@@ -67,7 +67,7 @@ fma_extension_startup( GTypeModule *module )
guint
fma_extension_get_version( void )
{
- static const gchar *thisfn = "nadp_module_fma_extension_get_version";
+ static const gchar *thisfn = "io-desktop/fma_module_fma_extension_get_version";
guint version;
version = 1;
@@ -85,17 +85,17 @@ fma_extension_get_version( void )
guint
fma_extension_list_types( const GType **types )
{
- static const gchar *thisfn = "nadp_module_fma_extension_list_types";
- static GType types_list [1+NADP_TYPES_COUNT];
+ static const gchar *thisfn = "io-desktop/fma_module_fma_extension_list_types";
+ static GType types_list [1+FMA_TYPES_COUNT];
g_debug( "%s: types=%p", thisfn, ( void * ) types );
types_list[0] = FMA_TYPE_DESKTOP_PROVIDER;
- types_list[NADP_TYPES_COUNT] = 0;
+ types_list[FMA_TYPES_COUNT] = 0;
*types = types_list;
- return( NADP_TYPES_COUNT );
+ return( FMA_TYPES_COUNT );
}
/*
@@ -106,7 +106,7 @@ fma_extension_list_types( const GType **types )
void
fma_extension_shutdown( void )
{
- static const gchar *thisfn = "nadp_module_fma_extension_shutdown";
+ static const gchar *thisfn = "io-desktop/fma_module_fma_extension_shutdown";
g_debug( "%s", thisfn );
}
diff --git a/src/io-desktop/nadp-monitor.c b/src/io-desktop/fma-monitor.c
similarity index 75%
rename from src/io-desktop/nadp-monitor.c
rename to src/io-desktop/fma-monitor.c
index 48acd01..4fbacae 100644
--- a/src/io-desktop/nadp-monitor.c
+++ b/src/io-desktop/fma-monitor.c
@@ -33,37 +33,37 @@
#include <gio/gio.h>
-#include "nadp-monitor.h"
+#include "fma-monitor.h"
/* private class data
*/
-struct _NadpMonitorClassPrivate {
+struct _FMAMonitorClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _NadpMonitorPrivate {
- gboolean dispose_has_run;
+struct _FMAMonitorPrivate {
+ gboolean dispose_has_run;
FMADesktopProvider *provider;
- gchar *name;
- GFile *file;
- GFileMonitor *monitor;
- gulong handler;
+ gchar *name;
+ GFile *file;
+ GFileMonitor *monitor;
+ gulong handler;
};
static GObjectClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NadpMonitorClass *klass );
+static void class_init( FMAMonitorClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
-static void on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent
event_type, NadpMonitor *my_monitor );
+static void on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent
event_type, FMAMonitor *my_monitor );
GType
-nadp_monitor_get_type( void )
+fma_monitor_get_type( void )
{
static GType class_type = 0;
@@ -77,32 +77,32 @@ nadp_monitor_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "nadp_monitor_register_type";
+ static const gchar *thisfn = "fma_monitor_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NadpMonitorClass ),
+ sizeof( FMAMonitorClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NadpMonitor ),
+ sizeof( FMAMonitor ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "NadpMonitor", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMAMonitor", &info, 0 );
return( type );
}
static void
-class_init( NadpMonitorClass *klass )
+class_init( FMAMonitorClass *klass )
{
- static const gchar *thisfn = "nadp_monitor_class_init";
+ static const gchar *thisfn = "fma_monitor_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -113,23 +113,23 @@ class_init( NadpMonitorClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- klass->private = g_new0( NadpMonitorClassPrivate, 1 );
+ klass->private = g_new0( FMAMonitorClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "nadp_monitor_instance_init";
- NadpMonitor *self;
+ static const gchar *thisfn = "fma_monitor_instance_init";
+ FMAMonitor *self;
- g_return_if_fail( NADP_IS_MONITOR( instance ));
+ g_return_if_fail( FMA_IS_MONITOR( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = NADP_MONITOR( instance );
+ self = FMA_MONITOR( instance );
- self->private = g_new0( NadpMonitorPrivate, 1 );
+ self->private = g_new0( FMAMonitorPrivate, 1 );
self->private->dispose_has_run = FALSE;
}
@@ -137,12 +137,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "nadp_monitor_instance_dispose";
- NadpMonitor *self;
+ static const gchar *thisfn = "fma_monitor_instance_dispose";
+ FMAMonitor *self;
- g_return_if_fail( NADP_IS_MONITOR( object ));
+ g_return_if_fail( FMA_IS_MONITOR( object ));
- self = NADP_MONITOR( object );
+ self = FMA_MONITOR( object );
if( !self->private->dispose_has_run ){
@@ -172,14 +172,14 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "nadp_monitor_instance_finalize";
- NadpMonitor *self;
+ static const gchar *thisfn = "fma_monitor_instance_finalize";
+ FMAMonitor *self;
- g_return_if_fail( NADP_IS_MONITOR( object ));
+ g_return_if_fail( FMA_IS_MONITOR( object ));
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- self = NADP_MONITOR( object );
+ self = FMA_MONITOR( object );
g_free( self->private->name );
@@ -192,23 +192,23 @@ instance_finalize( GObject *object )
}
/**
- * nadp_monitor_new:
+ * fma_monitor_new:
* @provider: the #FMADesktopProvider instance.
* @path: the path of a directory to be monitored.
*
* Installs a new monitor on the given directory.
*
- * Returns: a new #NadpMonitor instance.
+ * Returns: a new #FMAMonitor instance.
*/
-NadpMonitor *
-nadp_monitor_new( const FMADesktopProvider *provider, const gchar *path )
+FMAMonitor *
+fma_monitor_new( const FMADesktopProvider *provider, const gchar *path )
{
- static const gchar *thisfn = "nadp_monitor_new";
- NadpMonitor *monitor;
+ static const gchar *thisfn = "fma_monitor_new";
+ FMAMonitor *monitor;
GFileMonitorFlags flags;
GError *error;
- monitor = g_object_new( NADP_TYPE_MONITOR, NULL );
+ monitor = g_object_new( FMA_TYPE_MONITOR, NULL );
monitor->private->provider = FMA_DESKTOP_PROVIDER( provider );
monitor->private->name = g_strdup( path );
@@ -244,7 +244,7 @@ nadp_monitor_new( const FMADesktopProvider *provider, const gchar *path )
* - the renamed file is modified: n events on dir
*/
static void
-on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type,
NadpMonitor *my_monitor )
+on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type,
FMAMonitor *my_monitor )
{
fma_desktop_provider_on_monitor_event( my_monitor->private->provider );
}
diff --git a/src/io-desktop/nadp-monitor.h b/src/io-desktop/fma-monitor.h
similarity index 60%
rename from src/io-desktop/nadp-monitor.h
rename to src/io-desktop/fma-monitor.h
index d1f3921..b2de664 100644
--- a/src/io-desktop/nadp-monitor.h
+++ b/src/io-desktop/fma-monitor.h
@@ -27,13 +27,13 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __NADP_MONITOR_H__
-#define __NADP_MONITOR_H__
+#ifndef __IO_DESKTOP_FMA_MONITOR_H__
+#define __IO_DESKTOP_FMA_MONITOR_H__
/**
- * SECTION: nadp_monitor
- * @short_description: #NadpMonitor class definition.
- * @include: nadp-monitor.h
+ * SECTION: fma_monitor
+ * @short_description: #FMAMonitor class definition.
+ * @include: fma-monitor.h
*
* This class manages monitoring on .desktop files and directories.
* We also put a monitor on directories which do not exist, to be
@@ -50,35 +50,35 @@
G_BEGIN_DECLS
-#define NADP_TYPE_MONITOR ( nadp_monitor_get_type())
-#define NADP_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NADP_TYPE_MONITOR,
NadpMonitor ))
-#define NADP_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NADP_TYPE_MONITOR,
NadpMonitorClass ))
-#define NADP_IS_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NADP_TYPE_MONITOR ))
-#define NADP_IS_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NADP_TYPE_MONITOR ))
-#define NADP_MONITOR_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NADP_TYPE_MONITOR,
NadpMonitorClass ))
+#define FMA_TYPE_MONITOR ( fma_monitor_get_type())
+#define FMA_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_MONITOR, FMAMonitor ))
+#define FMA_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_MONITOR, FMAMonitorClass
))
+#define FMA_IS_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_MONITOR ))
+#define FMA_IS_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_MONITOR ))
+#define FMA_MONITOR_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_MONITOR,
FMAMonitorClass ))
-typedef struct _NadpMonitorPrivate NadpMonitorPrivate;
+typedef struct _FMAMonitorPrivate FMAMonitorPrivate;
typedef struct {
/*< private >*/
- GObject parent;
- NadpMonitorPrivate *private;
+ GObject parent;
+ FMAMonitorPrivate *private;
}
- NadpMonitor;
+ FMAMonitor;
-typedef struct _NadpMonitorClassPrivate NadpMonitorClassPrivate;
+typedef struct _FMAMonitorClassPrivate FMAMonitorClassPrivate;
typedef struct {
/*< private >*/
- GObjectClass parent;
- NadpMonitorClassPrivate *private;
+ GObjectClass parent;
+ FMAMonitorClassPrivate *private;
}
- NadpMonitorClass;
+ FMAMonitorClass;
-GType nadp_monitor_get_type( void );
+GType fma_monitor_get_type( void );
-NadpMonitor *nadp_monitor_new( const FMADesktopProvider *provider, const gchar *path );
+FMAMonitor *fma_monitor_new( const FMADesktopProvider *provider, const gchar *path );
G_END_DECLS
-#endif /* __NADP_MONITOR_H__ */
+#endif /* __IO_DESKTOP_FMA_MONITOR_H__ */
diff --git a/src/io-desktop/nadp-reader.c b/src/io-desktop/nadp-reader.c
index 3879050..87042c4 100644
--- a/src/io-desktop/nadp-reader.c
+++ b/src/io-desktop/nadp-reader.c
@@ -42,7 +42,7 @@
#include <api/fma-object-api.h>
#include "fma-desktop-provider.h"
-#include "nadp-keys.h"
+#include "fma-keys.h"
#include "nadp-reader.h"
#include "nadp-utils.h"
#include "nadp-xdg-dirs.h"
@@ -281,10 +281,10 @@ item_from_desktop_file( const FMADesktopProvider *provider, FMADesktopFile *ndf,
item = NULL;
type = fma_desktop_file_get_file_type( ndf );
- if( !strcmp( type, NADP_VALUE_TYPE_ACTION )){
+ if( !strcmp( type, FMA_VALUE_TYPE_ACTION )){
item = FMA_IFACTORY_OBJECT( fma_object_action_new());
- } else if( !strcmp( type, NADP_VALUE_TYPE_MENU )){
+ } else if( !strcmp( type, FMA_VALUE_TYPE_MENU )){
item = FMA_IFACTORY_OBJECT( fma_object_menu_new());
} else {
@@ -454,8 +454,8 @@ read_start_read_subitems_key( const FMAIFactoryProvider *provider, FMAObjectItem
gboolean key_found;
subitems = fma_desktop_file_get_string_list( reader_data->ndf,
- NADP_GROUP_DESKTOP,
- FMA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
+ FMA_GROUP_DESKTOP,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_KEY_PROFILES : FMA_KEY_ITEMS_LIST,
&key_found,
NULL );
@@ -510,12 +510,12 @@ nadp_reader_ifactory_provider_read_data( const FMAIFactoryProvider *reader, void
if( def->desktop_entry ){
if( FMA_IS_OBJECT_ITEM( object )){
- group = g_strdup( NADP_GROUP_DESKTOP );
+ group = g_strdup( FMA_GROUP_DESKTOP );
} else {
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 );
+ group = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, id );
g_free( id );
}
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 41b7583..9fbdee6 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -42,7 +42,7 @@
#include "fma-desktop-file.h"
#include "fma-desktop-provider.h"
#include "fma-formats.h"
-#include "nadp-keys.h"
+#include "fma-keys.h"
#include "nadp-utils.h"
#include "nadp-writer.h"
#include "nadp-xdg-dirs.h"
@@ -488,9 +488,9 @@ write_start_write_type( FMADesktopFile *ndp, FMAObjectItem *item )
{
fma_desktop_file_set_string(
ndp,
- NADP_GROUP_DESKTOP,
- NADP_KEY_TYPE,
- FMA_IS_OBJECT_ACTION( item ) ? NADP_VALUE_TYPE_ACTION : NADP_VALUE_TYPE_MENU );
+ FMA_GROUP_DESKTOP,
+ FMA_KEY_TYPE,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_VALUE_TYPE_ACTION : FMA_VALUE_TYPE_MENU );
}
/*
@@ -525,11 +525,11 @@ nadp_writer_ifactory_provider_write_data(
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 );
+ group_name = g_strdup_printf( "%s %s", FMA_GROUP_PROFILE, profile_id );
g_free( profile_id );
} else {
- group_name = g_strdup( NADP_GROUP_DESKTOP );
+ group_name = g_strdup( FMA_GROUP_DESKTOP );
}
if( !fma_data_boxed_is_default( boxed ) || def->write_if_default ){
@@ -614,8 +614,8 @@ write_done_write_subitems_list( FMADesktopFile *ndp, FMAObjectItem *item )
fma_desktop_file_set_string_list(
ndp,
- NADP_GROUP_DESKTOP,
- FMA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
+ FMA_GROUP_DESKTOP,
+ FMA_IS_OBJECT_ACTION( item ) ? FMA_KEY_PROFILES : FMA_KEY_ITEMS_LIST,
subitems );
profile_groups = fma_desktop_file_get_profiles( ndp );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]