[nautilus-actions] Desktop provider implements get_id and get_version



commit f237357a66a1a6806c93b0695014fc67dd9e8b81
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Dec 13 00:40:08 2009 +0100

    Desktop provider implements get_id and get_version

 ChangeLog                                          |    3 ++
 .../io-provider-desktop/nadp-desktop-provider.c    |   27 ++++++++++++++++---
 2 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 193ff1f..a7ca879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-12-12 Pierre Wieser <pwieser trychlos org>
 
+	* nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
+	(get_id, get_version): New functions.
+
 	* doc/io-provider-id: New file to handle allocated providers ids.
 
 	* nautilus-actions/api/na-iio-provider.c:
diff --git a/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c b/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
index adf9be6..e814140 100644
--- a/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
+++ b/nautilus-actions/io-provider-desktop/nadp-desktop-provider.c
@@ -55,11 +55,14 @@ struct NadpDesktopProviderPrivate {
 static GType         st_module_type = 0;
 static GObjectClass *st_parent_class = NULL;
 
-static void           class_init( NadpDesktopProviderClass *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 void   class_init( NadpDesktopProviderClass *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( NadpDesktopProvider *provider );
+static guint  get_version( NadpDesktopProvider *provider );
 
 GType
 nadp_desktop_provider_get_type( void )
@@ -121,6 +124,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 = nadp_iio_provider_read_items;
 	iface->is_willing_to_write = nadp_iio_provider_is_willing_to_write;
 	iface->is_writable = nadp_iio_provider_is_writable;
@@ -179,3 +184,15 @@ instance_finalize( GObject *object )
 		G_OBJECT_CLASS( st_parent_class )->finalize( object );
 	}
 }
+
+static gchar *
+get_id( NadpDesktopProvider *provider )
+{
+	return( g_strdup( "na-desktop" ));
+}
+
+static guint
+get_version( NadpDesktopProvider *provider )
+{
+	return( 1 );
+}



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