[nautilus-actions] Fix modification status of new items to make them saveable



commit 54f935c1ff800c3915403633b5ff3a69dc0a3df1
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Feb 27 12:54:09 2010 +0100

    Fix modification status of new items to make them saveable

 ChangeLog                  |    8 ++++++++
 src/core/na-iduplicable.c  |    2 +-
 src/nact/nact-tree-model.c |    3 +--
 3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6a8fc95..25eb8bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-27 Pierre Wieser <pwieser trychlos org>
+
+	* src/core/na-iduplicable.c (get_duplicable_str):
+	Initialize modification status to TRUE if origin is NULL.
+
+	* src/nact/nact-tree-model.c (nact_tree_model_fill):
+	Recheck modification and validity status of newly duplicated object.
+
 2009-02-26 Pierre Wieser <pwieser trychlos org>
 
 	Fix references count mistakes in NACT.
diff --git a/src/core/na-iduplicable.c b/src/core/na-iduplicable.c
index fcd566b..64cd668 100644
--- a/src/core/na-iduplicable.c
+++ b/src/core/na-iduplicable.c
@@ -577,7 +577,7 @@ get_duplicable_str( const NAIDuplicable *object )
 		str = g_new0( DuplicableStr, 1 );
 
 		str->origin = NULL;
-		str->modified = FALSE;
+		str->modified = TRUE;
 		str->valid = TRUE;
 
 		str->status_changed_handler_id = g_signal_connect(
diff --git a/src/nact/nact-tree-model.c b/src/nact/nact-tree-model.c
index 74aebda..f55b855 100644
--- a/src/nact/nact-tree-model.c
+++ b/src/nact/nact-tree-model.c
@@ -606,9 +606,8 @@ nact_tree_model_fill( NactTreeModel *model, GList *items, gboolean are_profiles_
 
 		for( it = items ; it ; it = it->next ){
 			duplicate = ( NAObject * ) na_object_duplicate( it->data );
+			na_object_check_status( duplicate );
 			fill_tree_store( ts_model, model->private->treeview, duplicate, are_profiles_displayed, NULL );
-			/*g_debug( "%s: before_na_object_unref: duplicate=%p (%s, ref_count=%d)", thisfn,
-					( void * ) duplicate, G_OBJECT_TYPE_NAME( duplicate ), G_OBJECT( duplicate )->ref_count );*/
 			na_object_unref( duplicate );
 		}
 	}



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