[nautilus-actions] Record the provider in each NAAction object



commit eb67db6d06e48356616519094607937852ab8354
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Jun 20 14:53:10 2009 +0200

    Record the provider in each NAAction object

 ChangeLog                    |    7 ++++++-
 src/common/na-gconf.c        |    1 +
 src/common/na-iio-provider.c |    8 +++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4877196..816321c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-20 Pierre Wieser <pwieser trychlos org>
+
+	* src/common/na-iio-provider.c:
+	Record the provider in each NAAction object.
+
 2009-06-19 Pierre Wieser <pwieser trychlos org>
 
 	Getting NA (Nautilus Actions) as common objects prefix.
@@ -40,7 +45,7 @@
 	* src/nact/nact-wnd-actions.h:
 	Define and implement new class NactWndActions.
 
-	* src/common/Makefile.am:
+	* src/nact/Makefile.am:
 	Updated accordingly.
 
 2009-06-18 Pierre Wieser <pwieser trychlos org>
diff --git a/src/common/na-gconf.c b/src/common/na-gconf.c
index 06387fd..d899650 100644
--- a/src/common/na-gconf.c
+++ b/src/common/na-gconf.c
@@ -300,6 +300,7 @@ do_read_actions( NAIIOProvider *provider )
 		na_action_free_profiles( profiles );
 
 		items = g_slist_prepend( items, action );
+
 		g_free( key );
 	}
 
diff --git a/src/common/na-iio-provider.c b/src/common/na-iio-provider.c
index 6c5f988..19e53ff 100644
--- a/src/common/na-iio-provider.c
+++ b/src/common/na-iio-provider.c
@@ -138,7 +138,7 @@ na_iio_provider_read_actions( const GObject *object )
 	NAPivot *pivot = NA_PIVOT( object );
 
 	GSList *actions = NULL;
-	GSList *ip;
+	GSList *ip, *il;
 	GSList *list;
 	NAIIOProvider *instance;
 
@@ -149,7 +149,13 @@ na_iio_provider_read_actions( const GObject *object )
 		instance = NA_IIO_PROVIDER( ip->data );
 
 		if( NA_IIO_PROVIDER_GET_INTERFACE( instance )->read_actions ){
+
 			list = NA_IIO_PROVIDER_GET_INTERFACE( instance )->read_actions( instance );
+
+			for( il = list ; il ; il = il->next ){
+				g_object_set_data( G_OBJECT( il->data ), "provider", instance );
+			}
+
 			actions = g_slist_concat( actions, list );
 		}
 	}



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