[nautilus-actions/file-manager-actions] FMAMonitor class is renamed to FMADesktopMonitor
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] FMAMonitor class is renamed to FMADesktopMonitor
- Date: Tue, 8 Sep 2015 14:46:48 +0000 (UTC)
commit 699a7e1914c6768d18a44bd9d901fe91e15e6cb7
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 16:24:04 2015 +0200
FMAMonitor class is renamed to FMADesktopMonitor
src/io-desktop/Makefile.am | 4 +-
.../{fma-monitor.c => fma-desktop-monitor.c} | 68 ++++++++++----------
.../{fma-monitor.h => fma-desktop-monitor.h} | 44 ++++++------
src/io-desktop/fma-desktop-provider.c | 6 +-
4 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index 9479d62..6776c57 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -50,8 +50,8 @@ libna_io_desktop_la_SOURCES = \
fma-desktop-keys.c \
fma-desktop-keys.h \
fma-desktop-module.c \
- fma-monitor.c \
- fma-monitor.h \
+ fma-desktop-monitor.c \
+ fma-desktop-monitor.h \
fma-desktop-reader.c \
fma-desktop-reader.h \
nadp-utils.c \
diff --git a/src/io-desktop/fma-monitor.c b/src/io-desktop/fma-desktop-monitor.c
similarity index 75%
rename from src/io-desktop/fma-monitor.c
rename to src/io-desktop/fma-desktop-monitor.c
index 4fbacae..76c6306 100644
--- a/src/io-desktop/fma-monitor.c
+++ b/src/io-desktop/fma-desktop-monitor.c
@@ -33,17 +33,17 @@
#include <gio/gio.h>
-#include "fma-monitor.h"
+#include "fma-desktop-monitor.h"
/* private class data
*/
-struct _FMAMonitorClassPrivate {
+struct _FMADesktopMonitorClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* private instance data
*/
-struct _FMAMonitorPrivate {
+struct _FMADesktopMonitorPrivate {
gboolean dispose_has_run;
FMADesktopProvider *provider;
gchar *name;
@@ -55,15 +55,15 @@ struct _FMAMonitorPrivate {
static GObjectClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( FMAMonitorClass *klass );
+static void class_init( FMADesktopMonitorClass *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, FMAMonitor *my_monitor );
+static void on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent
event_type, FMADesktopMonitor *my_monitor );
GType
-fma_monitor_get_type( void )
+fma_desktop_monitor_get_type( void )
{
static GType class_type = 0;
@@ -77,32 +77,32 @@ fma_monitor_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "fma_monitor_register_type";
+ static const gchar *thisfn = "fma_desktop_monitor_register_type";
GType type;
static GTypeInfo info = {
- sizeof( FMAMonitorClass ),
+ sizeof( FMADesktopMonitorClass ),
NULL,
NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( FMAMonitor ),
+ sizeof( FMADesktopMonitor ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "FMAMonitor", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMADesktopMonitor", &info, 0 );
return( type );
}
static void
-class_init( FMAMonitorClass *klass )
+class_init( FMADesktopMonitorClass *klass )
{
- static const gchar *thisfn = "fma_monitor_class_init";
+ static const gchar *thisfn = "fma_desktop_monitor_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -113,23 +113,23 @@ class_init( FMAMonitorClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- klass->private = g_new0( FMAMonitorClassPrivate, 1 );
+ klass->private = g_new0( FMADesktopMonitorClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "fma_monitor_instance_init";
- FMAMonitor *self;
+ static const gchar *thisfn = "fma_desktop_monitor_instance_init";
+ FMADesktopMonitor *self;
- g_return_if_fail( FMA_IS_MONITOR( instance ));
+ g_return_if_fail( FMA_IS_DESKTOP_MONITOR( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = FMA_MONITOR( instance );
+ self = FMA_DESKTOP_MONITOR( instance );
- self->private = g_new0( FMAMonitorPrivate, 1 );
+ self->private = g_new0( FMADesktopMonitorPrivate, 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 = "fma_monitor_instance_dispose";
- FMAMonitor *self;
+ static const gchar *thisfn = "fma_desktop_monitor_instance_dispose";
+ FMADesktopMonitor *self;
- g_return_if_fail( FMA_IS_MONITOR( object ));
+ g_return_if_fail( FMA_IS_DESKTOP_MONITOR( object ));
- self = FMA_MONITOR( object );
+ self = FMA_DESKTOP_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 = "fma_monitor_instance_finalize";
- FMAMonitor *self;
+ static const gchar *thisfn = "fma_desktop_monitor_instance_finalize";
+ FMADesktopMonitor *self;
- g_return_if_fail( FMA_IS_MONITOR( object ));
+ g_return_if_fail( FMA_IS_DESKTOP_MONITOR( object ));
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- self = FMA_MONITOR( object );
+ self = FMA_DESKTOP_MONITOR( object );
g_free( self->private->name );
@@ -192,23 +192,23 @@ instance_finalize( GObject *object )
}
/**
- * fma_monitor_new:
+ * fma_desktop_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 #FMAMonitor instance.
+ * Returns: a new #FMADesktopMonitor instance.
*/
-FMAMonitor *
-fma_monitor_new( const FMADesktopProvider *provider, const gchar *path )
+FMADesktopMonitor *
+fma_desktop_monitor_new( const FMADesktopProvider *provider, const gchar *path )
{
- static const gchar *thisfn = "fma_monitor_new";
- FMAMonitor *monitor;
+ static const gchar *thisfn = "fma_desktop_monitor_new";
+ FMADesktopMonitor *monitor;
GFileMonitorFlags flags;
GError *error;
- monitor = g_object_new( FMA_TYPE_MONITOR, NULL );
+ monitor = g_object_new( FMA_TYPE_DESKTOP_MONITOR, NULL );
monitor->private->provider = FMA_DESKTOP_PROVIDER( provider );
monitor->private->name = g_strdup( path );
@@ -244,7 +244,7 @@ fma_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,
FMAMonitor *my_monitor )
+on_monitor_changed( GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type,
FMADesktopMonitor *my_monitor )
{
fma_desktop_provider_on_monitor_event( my_monitor->private->provider );
}
diff --git a/src/io-desktop/fma-monitor.h b/src/io-desktop/fma-desktop-monitor.h
similarity index 55%
rename from src/io-desktop/fma-monitor.h
rename to src/io-desktop/fma-desktop-monitor.h
index b2de664..ba83a14 100644
--- a/src/io-desktop/fma-monitor.h
+++ b/src/io-desktop/fma-desktop-monitor.h
@@ -27,13 +27,13 @@
* ... and many others (see AUTHORS)
*/
-#ifndef __IO_DESKTOP_FMA_MONITOR_H__
-#define __IO_DESKTOP_FMA_MONITOR_H__
+#ifndef __IO_DESKTOP_FMA_DESKTOP_MONITOR_H__
+#define __IO_DESKTOP_FMA_DESKTOP_MONITOR_H__
/**
- * SECTION: fma_monitor
- * @short_description: #FMAMonitor class definition.
- * @include: fma-monitor.h
+ * SECTION: fma_desktop_monitor
+ * @short_description: #FMADesktopMonitor class definition.
+ * @include: fma-desktop-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 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 ))
+#define FMA_TYPE_DESKTOP_MONITOR ( fma_desktop_monitor_get_type())
+#define FMA_DESKTOP_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object,
FMA_TYPE_DESKTOP_MONITOR, FMADesktopMonitor ))
+#define FMA_DESKTOP_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_DESKTOP_MONITOR,
FMADesktopMonitorClass ))
+#define FMA_IS_DESKTOP_MONITOR( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object,
FMA_TYPE_DESKTOP_MONITOR ))
+#define FMA_IS_DESKTOP_MONITOR_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ),
FMA_TYPE_DESKTOP_MONITOR ))
+#define FMA_DESKTOP_MONITOR_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ),
FMA_TYPE_DESKTOP_MONITOR, FMADesktopMonitorClass ))
-typedef struct _FMAMonitorPrivate FMAMonitorPrivate;
+typedef struct _FMADesktopMonitorPrivate FMADesktopMonitorPrivate;
typedef struct {
/*< private >*/
- GObject parent;
- FMAMonitorPrivate *private;
+ GObject parent;
+ FMADesktopMonitorPrivate *private;
}
- FMAMonitor;
+ FMADesktopMonitor;
-typedef struct _FMAMonitorClassPrivate FMAMonitorClassPrivate;
+typedef struct _FMADesktopMonitorClassPrivate FMADesktopMonitorClassPrivate;
typedef struct {
/*< private >*/
- GObjectClass parent;
- FMAMonitorClassPrivate *private;
+ GObjectClass parent;
+ FMADesktopMonitorClassPrivate *private;
}
- FMAMonitorClass;
+ FMADesktopMonitorClass;
-GType fma_monitor_get_type( void );
+GType fma_desktop_monitor_get_type( void );
-FMAMonitor *fma_monitor_new( const FMADesktopProvider *provider, const gchar *path );
+FMADesktopMonitor *fma_desktop_monitor_new ( const FMADesktopProvider *provider, const gchar *path );
G_END_DECLS
-#endif /* __IO_DESKTOP_FMA_MONITOR_H__ */
+#endif /* __IO_DESKTOP_FMA_DESKTOP_MONITOR_H__ */
diff --git a/src/io-desktop/fma-desktop-provider.c b/src/io-desktop/fma-desktop-provider.c
index d0c293a..bff5c35 100644
--- a/src/io-desktop/fma-desktop-provider.c
+++ b/src/io-desktop/fma-desktop-provider.c
@@ -40,7 +40,7 @@
#include "fma-desktop-provider.h"
#include "fma-desktop-formats.h"
#include "fma-desktop-keys.h"
-#include "fma-monitor.h"
+#include "fma-desktop-monitor.h"
#include "fma-desktop-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 )
{
- FMAMonitor *monitor;
+ FMADesktopMonitor *monitor;
g_return_if_fail( FMA_IS_DESKTOP_PROVIDER( provider ));
if( !provider->private->dispose_has_run ){
- monitor = fma_monitor_new( provider, dir );
+ monitor = fma_desktop_monitor_new( provider, dir );
provider->private->monitors = g_list_prepend( provider->private->monitors, monitor );
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]