[nautilus-actions] GConf provider implements get_id and get_version



commit 2943be15647d5886e175fe92d38002237fac2dfe
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Dec 13 00:46:31 2009 +0100

    GConf provider implements get_id and get_version

 ChangeLog                                          |    1 +
 .../io-provider-desktop/nadp-desktop-provider.c    |    8 ++--
 .../io-provider-gconf/nagp-gconf-provider.c        |   43 ++++++++++++++------
 3 files changed, 35 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a7ca879..588dd59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-12-12 Pierre Wieser <pwieser trychlos org>
 
+	* nautilus-actions/io-provider-gconf/nagp-gconf-provider.c:
 	* nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
 	(get_id, get_version): New functions.
 
diff --git a/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c b/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
index e814140..37f1fe5 100644
--- a/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
+++ b/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
@@ -61,8 +61,8 @@ static void   instance_init( GTypeInstance *instance, gpointer klass );
 static void   instance_dispose( GObject *object );
 static void   instance_finalize( GObject *object );
 
-static gchar *get_id( NadpDesktopProvider *provider );
-static guint  get_version( NadpDesktopProvider *provider );
+static gchar *get_id( const NAIIOProvider *provider );
+static guint  get_version( const NAIIOProvider *provider );
 
 GType
 nadp_desktop_provider_get_type( void )
@@ -186,13 +186,13 @@ instance_finalize( GObject *object )
 }
 
 static gchar *
-get_id( NadpDesktopProvider *provider )
+get_id( const NAIIOProvider *provider )
 {
 	return( g_strdup( "na-desktop" ));
 }
 
 static guint
-get_version( NadpDesktopProvider *provider )
+get_version( const NAIIOProvider *provider )
 {
 	return( 1 );
 }
diff --git a/nautilus-actions/io-provider-gconf/nagp-gconf-provider.c b/nautilus-actions/io-provider-gconf/nagp-gconf-provider.c
index d651b58..b3cef41 100644
--- a/nautilus-actions/io-provider-gconf/nagp-gconf-provider.c
+++ b/nautilus-actions/io-provider-gconf/nagp-gconf-provider.c
@@ -53,19 +53,22 @@ static GObjectClass *st_parent_class = NULL;
 static gint          st_timeout_msec = 100;
 static gint          st_timeout_usec = 100000;
 
-static void           class_init( NagpGConfProviderClass *klass );
-static void           iio_provider_iface_init( NAIIOProviderInterface *iface );
-static void           instance_init( GTypeInstance *instance, gpointer klass );
-static void           instance_dispose( GObject *object );
-static void           instance_finalize( GObject *object );
-
-static GList         *install_monitors( NagpGConfProvider *provider );
-static void           config_path_changed_cb( GConfClient *client, guint cnxn_id, GConfEntry *entry, NagpGConfProvider *provider );
-static void           config_path_changed_reset_timeout( NagpGConfProvider *provider );
-static void           config_path_changed_set_timeout( NagpGConfProvider *provider, const gchar *uuid );
-static gboolean       config_path_changed_trigger_interface( NagpGConfProvider *provider );
-static gulong         time_val_diff( const GTimeVal *recent, const GTimeVal *old );
-static gchar         *entry2uuid( GConfEntry *entry );
+static void     class_init( NagpGConfProviderClass *klass );
+static void     iio_provider_iface_init( NAIIOProviderInterface *iface );
+static void     instance_init( GTypeInstance *instance, gpointer klass );
+static void     instance_dispose( GObject *object );
+static void     instance_finalize( GObject *object );
+
+static gchar   *get_id( const NAIIOProvider *provider );
+static guint    get_version( const NAIIOProvider *provider );
+
+static GList   *install_monitors( NagpGConfProvider *provider );
+static void     config_path_changed_cb( GConfClient *client, guint cnxn_id, GConfEntry *entry, NagpGConfProvider *provider );
+static void     config_path_changed_reset_timeout( NagpGConfProvider *provider );
+static void     config_path_changed_set_timeout( NagpGConfProvider *provider, const gchar *uuid );
+static gboolean config_path_changed_trigger_interface( NagpGConfProvider *provider );
+static gulong   time_val_diff( const GTimeVal *recent, const GTimeVal *old );
+static gchar   *entry2uuid( GConfEntry *entry );
 
 GType
 nagp_gconf_provider_get_type( void )
@@ -127,6 +130,8 @@ iio_provider_iface_init( NAIIOProviderInterface *iface )
 
 	g_debug( "%s: iface=%p", thisfn, ( void * ) iface );
 
+	iface->get_id = get_id;
+	iface->get_version = get_version;
 	iface->read_items = nagp_iio_provider_read_items;
 	iface->is_willing_to_write = nagp_iio_provider_is_willing_to_write;
 	iface->is_writable = nagp_iio_provider_is_writable;
@@ -194,6 +199,18 @@ instance_finalize( GObject *object )
 	}
 }
 
+static gchar *
+get_id( const NAIIOProvider *provider )
+{
+	return( g_strdup( "na-gconf" ));
+}
+
+static guint
+get_version( const NAIIOProvider *provider )
+{
+	return( 1 );
+}
+
 static GList *
 install_monitors( NagpGConfProvider *provider )
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]