aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-04-30 05:26:48 +0800
committerChris Lahey <clahey@src.gnome.org>2002-04-30 05:26:48 +0800
commit320ea94ae8166f9e0ec90d784d8af35453344baf (patch)
treecf52c8452154ffb3af6b1e071b38ea1f2e0f3dd3 /widgets/table
parent8f07a288b4cec7df3d5bcefd43158061a8073886 (diff)
downloadgsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar.gz
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar.bz2
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar.lz
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar.xz
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.tar.zst
gsoc2013-evolution-320ea94ae8166f9e0ec90d784d8af35453344baf.zip
Changed LDFLAGS to LIBS for tests here. Bumped the version number to
2002-04-29 Christopher James Lahey <clahey@ximian.com> * 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 <clahey@ximian.com> * 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
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree.c36
-rw-r--r--widgets/table/e-tree.h3
2 files changed, 39 insertions, 0 deletions
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);