0.8.8claws111
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 17 Jan 2003 23:26:28 +0000 (23:26 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 17 Jan 2003 23:26:28 +0000 (23:26 +0000)
* src/folder.c
        destroy folder items, when a folder item is removed

ChangeLog.claws
configure.ac
src/folder.c

index 818c95e..792b2bc 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-17 [christoph] 0.8.8claws111
+
+       * src/folder.c
+               destroy folder items, when a folder item is removed
+
 2003-01-17 [christoph] 0.8.8claws110
 
        * src/folder.c
 2003-01-17 [christoph] 0.8.8claws110
 
        * src/folder.c
index 9f930a9..74bb9e6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws110
+EXTRA_VERSION=claws111
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index e4eb3c0..a5ad8c1 100644 (file)
@@ -247,6 +247,11 @@ void folder_item_append(FolderItem *parent, FolderItem *item)
        g_node_append_data(node, item);
 }
 
        g_node_append_data(node, item);
 }
 
+gboolean folder_item_remove_func(GNode *node, gpointer data)
+{
+       folder_item_destroy((FolderItem *)node->data);
+}
+
 void folder_item_remove(FolderItem *item)
 {
        GNode *node;
 void folder_item_remove(FolderItem *item)
 {
        GNode *node;
@@ -258,6 +263,9 @@ void folder_item_remove(FolderItem *item)
        node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
        g_return_if_fail(node != NULL);
 
        node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
        g_return_if_fail(node != NULL);
 
+       g_node_traverse(node, G_POST_ORDER, G_TRAVERSE_ALL, -1,
+                       folder_item_remove_func, NULL);
+
        /* TODO: free all FolderItem's first */
        if (item->folder->node == node)
                item->folder->node = NULL;
        /* TODO: free all FolderItem's first */
        if (item->folder->node == node)
                item->folder->node = NULL;