From 320ea94ae8166f9e0ec90d784d8af35453344baf Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 29 Apr 2002 21:26:48 +0000 Subject: Changed LDFLAGS to LIBS for tests here. Bumped the version number to 2002-04-29 Christopher James Lahey * configure.in: Changed LDFLAGS to LIBS for tests here. Bumped the version number to 0.19.99.15. From gal/e-table/ChangeLog: 2002-04-29 Christopher James Lahey * e-tree.c, e-tree.h (e_tree_path_foreach): Added this function which recurses over all nodes, regardless of selection. svn path=/trunk/; revision=16635 --- widgets/table/e-tree.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'widgets/table/e-tree.c') diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 51d807eed4..e92254ce10 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1658,6 +1658,42 @@ e_tree_selected_path_foreach (ETree *e_tree, callback, closure); } + +/* Standard functions */ +static void +et_foreach_recurse (ETreeModel *model, + ETreePath path, + ETreeForeachFunc callback, + gpointer closure) +{ + ETreePath child; + + callback(path, closure); + + child = e_tree_model_node_get_first_child(E_TREE_MODEL(model), path); + for ( ; child; child = e_tree_model_node_get_next(E_TREE_MODEL(model), child)) + if (child) + et_foreach_recurse (model, child, callback, closure); +} + +void +e_tree_path_foreach (ETree *e_tree, + ETreeForeachFunc callback, + gpointer closure) +{ + ETreePath root; + + g_return_if_fail(e_tree != NULL); + g_return_if_fail(E_IS_TREE(e_tree)); + + root = e_tree_model_get_root (e_tree->priv->model); + + if (root) + et_foreach_recurse (e_tree->priv->model, + root, + callback, + closure); +} #endif EPrintable * -- cgit