From 02ff1e11ae73af6c2b90108b5228158505478ed0 Mon Sep 17 00:00:00 2001 From: jacob berkman Date: Mon, 14 May 2001 18:58:39 +0000 Subject: set the subfolder's parent to NULL so the subfolder list doesn't change 2001-05-14 jacob berkman * e-folder-tree.c (remove_folder): set the subfolder's parent to NULL so the subfolder list doesn't change whilst we are using it (folder_remove_subfolder): this function didn't used to work at all svn path=/trunk/; revision=9795 --- shell/ChangeLog | 7 +++++++ shell/e-folder-tree.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index a3959bea83..513d09e083 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2001-05-14 jacob berkman + + * e-folder-tree.c (remove_folder): set the subfolder's parent to + NULL so the subfolder list doesn't change whilst we are using it + (folder_remove_subfolder): this function didn't used to work at + all + 2001-05-12 Chris Toshok * e-storage-set-view.c (tree_drag_data_received): implement the diff --git a/shell/e-folder-tree.c b/shell/e-folder-tree.c index bdafea8734..e878bd24d6 100644 --- a/shell/e-folder-tree.c +++ b/shell/e-folder-tree.c @@ -107,7 +107,8 @@ static void folder_remove_subfolder (Folder *folder, Folder *subfolder) { - g_list_remove (folder->subfolders, folder); + folder->subfolders = g_list_remove (folder->subfolders, subfolder); + subfolder->parent = NULL; } static void @@ -142,6 +143,7 @@ remove_folder (EFolderTree *folder_tree, Folder *subfolder; subfolder = (Folder *) p->data; + subfolder->parent = NULL; remove_folder (folder_tree, subfolder); } -- cgit v1.2.3