aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacob berkman <jacob@ximian.com>2001-05-15 02:58:39 +0800
committerJacob Berkman <jberkman@src.gnome.org>2001-05-15 02:58:39 +0800
commit02ff1e11ae73af6c2b90108b5228158505478ed0 (patch)
tree84c7985bd33a27424de47fe91b8f32f94f94b35f
parentd77e174e5642e9300092b27574633b7909027e49 (diff)
downloadgsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.gz
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.bz2
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.lz
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.xz
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.zst
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.zip
set the subfolder's parent to NULL so the subfolder list doesn't change
2001-05-14 jacob berkman <jacob@ximian.com> * 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
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-folder-tree.c4
2 files changed, 10 insertions, 1 deletions
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 <jacob@ximian.com>
+
+ * 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 <toshok@ximian.com>
* 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);
}