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 ++++++++++++++++++++++++++++++++++++ widgets/table/e-tree.h | 3 +++ 2 files changed, 39 insertions(+) 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 * diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 68b60f8c25..2b74f3b8b0 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -184,6 +184,9 @@ void e_tree_selected_row_foreach (ETree *e_tree, void e_tree_selected_path_foreach (ETree *e_tree, ETreeForeachFunc callback, gpointer closure); +void e_tree_path_foreach (ETree *e_tree, + ETreeForeachFunc callback, + gpointer closure); #endif gint e_tree_selected_count (ETree *e_tree); EPrintable *e_tree_get_printable (ETree *e_tree); -- cgit v1.2.3