[nautilus-actions/gnome-2-28] Fix copy of profiles of an action



commit d25ff97805480879f027b3859cdb7214f9786e1e
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Oct 29 18:09:19 2009 +0100

    Fix copy of profiles of an action
    
    Reinitialize the list of profiles of the target before duplicating the profiles
    of the source. This bug was visible because saving a modification in NACT didn't
    reinitialize correctly the modification status of the application.

 ChangeLog              |    4 ++++
 src/common/na-action.c |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d19e9cd..4e8cb13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-29 Pierre Wieser <pwieser trychlos org>
+
+	* src/common/na-action.c (object_copy): Fix copy of profiles.
+
 2009-10-28 Pierre Wieser <pwieser trychlos org>
 
 	* src/utils/nautilus-actions-new.c:
diff --git a/src/common/na-action.c b/src/common/na-action.c
index 6538007..2288c19 100644
--- a/src/common/na-action.c
+++ b/src/common/na-action.c
@@ -939,6 +939,9 @@ object_copy( NAObject *target, const NAObject *source )
 
 	g_free( version );
 
+	na_action_free_profiles( NA_ACTION( target )->private->profiles );
+	NA_ACTION( target )->private->profiles = NULL;
+
 	for( ip = NA_ACTION( source )->private->profiles ; ip ; ip = ip->next ){
 		profile = NA_ACTION_PROFILE( na_object_duplicate( NA_OBJECT( ip->data )));
 		na_action_attach_profile( NA_ACTION( target ), profile );



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