aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-07 10:26:36 +0800
committerDan Winship <danw@src.gnome.org>2000-07-07 10:26:36 +0800
commit540bde0aff7cc2b29f90a29e974e09fd400ae7ba (patch)
tree6867e0e3364f93ede1a98ac2c8e33b91a17d1f12 /widgets/table
parent1c3ee9654bec525a0f650f20dfea92c3f79b6e4a (diff)
downloadgsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar.gz
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar.bz2
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar.lz
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar.xz
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.tar.zst
gsoc2013-evolution-540bde0aff7cc2b29f90a29e974e09fd400ae7ba.zip
Make this work recursively.
* e-tree-model.c (e_tree_model_node_remove): Make this work recursively. svn path=/trunk/; revision=3935
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-model.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 250ff4edb7..40e54a1667 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -634,6 +634,12 @@ e_tree_model_node_insert_before (ETreeModel *etree,
node_data);
}
+static void
+child_remove (GNode *node, gpointer etree)
+{
+ e_tree_model_node_remove (etree, node);
+}
+
gpointer
e_tree_model_node_remove (ETreeModel *etree, ETreePath *path)
{
@@ -641,7 +647,8 @@ e_tree_model_node_remove (ETreeModel *etree, ETreePath *path)
ENode *enode = (ENode*)path->data;
gpointer ret = enode->node_data;
- g_return_val_if_fail (!g_node_first_child(path), NULL);
+ /* remove children */
+ g_node_children_foreach (path, G_TRAVERSE_ALL, child_remove, etree);
/* clean up the display */
if (parent) {