[nautilus-actions] Free the delete list before filling the tree



commit 005eccac494ef4efe1614584c8a72c8d79c5b398
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Mar 17 21:15:29 2010 +0100

    Free the delete list before filling the tree

 ChangeLog                   |    3 +++
 src/nact/nact-main-window.c |    8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b6e6ec9..9305f68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-03-17 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-main-window.c (reload):
+	Free the deleted list before filling the tree.
+
 	* src/nact/nact-main-menubar.c
 	(on_cut_activated): Do not cut not deletable items.
 	(get_deletables): Add a ref on items to delete.
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index d7ad25c..9b639b6 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -698,7 +698,7 @@ instance_dispose( GObject *window )
 		base_iprefs_set_int( BASE_WINDOW( window ), "main-paned", pos );
 
 		for( it = self->private->deleted ; it ; it = it->next ){
-			g_debug( "nact_main_window_instance_dispose: %p (%s)", ( void * ) it->data, G_OBJECT_TYPE_NAME( it->data ));
+			g_debug( "nact_main_window_instance_dispose: deleted=%p (%s)", ( void * ) it->data, G_OBJECT_TYPE_NAME( it->data ));
 		}
 		na_object_unref_items( self->private->deleted );
 
@@ -1397,14 +1397,14 @@ reload( NactMainWindow *window )
 		window->private->edited_profile = NULL;
 		window->private->selected_row = NULL;
 
+		na_object_unref_items( window->private->deleted );
+		window->private->deleted = NULL;
+
 		application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
 		updater = nact_application_get_updater( application );
 		na_pivot_load_items( NA_PIVOT( updater ));
 		nact_iactions_list_fill( NACT_IACTIONS_LIST( window ), na_pivot_get_items( NA_PIVOT( updater )));
 		nact_iactions_list_bis_select_first_row( NACT_IACTIONS_LIST( window ));
-
-		na_object_unref_items( window->private->deleted );
-		window->private->deleted = NULL;
 	}
 }
 



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