diff options
author | Richard Hult <rhult@codefactory.se> | 2001-04-04 08:20:16 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-04-04 08:20:16 +0800 |
commit | 71452a5477aaeed8606fc864ab63246dc81eb698 (patch) | |
tree | ba342574d24a58b57674f7a181341c1fc3d3ddbb /widgets/table/e-tree-model.c | |
parent | c7179850dc119bd6c1a250b5892eee28a92c3e58 (diff) | |
download | gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.gz gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.bz2 gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.lz gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.xz gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.zst gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.zip |
Add argument to get the table adapter. (et_set_arg): Add arguments for
2001-04-03 Richard Hult <rhult@codefactory.se>
* e-tree.c (et_get_arg): Add argument to get the table adapter.
(et_set_arg): Add arguments for setting drawing of the grid and
focus.
* e-tree-model.c, e-tree-model.h (e_tree_model_node_traverse):
Fill in missing implementation.
(e_tree_model_node_traverse_preorder): Likewise, but preorder
traversal.
svn path=/trunk/; revision=9156
Diffstat (limited to 'widgets/table/e-tree-model.c')
-rw-r--r-- | widgets/table/e-tree-model.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c index 60b01310ab..24eada7d56 100644 --- a/widgets/table/e-tree-model.c +++ b/widgets/table/e-tree-model.c @@ -740,3 +740,69 @@ e_tree_model_value_to_string (ETreeModel *etree, int col, const void *value) else return g_strdup(""); } + +/** + * e_tree_model_node_traverse: + * @model: + * @path: + * @func: + * @data: + * + * + **/ +void +e_tree_model_node_traverse (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data) +{ + ETreePath child; + + g_return_if_fail (model != NULL); + g_return_if_fail (E_IS_TREE_MODEL (model)); + g_return_if_fail (path != NULL); + + child = e_tree_model_node_get_first_child (model, path); + + while (child) { + ETreePath next_child; + + next_child = e_tree_model_node_get_next (model, child); + e_tree_model_node_traverse (model, child, func, data); + if (func (model, child, data) == TRUE) + return; + + child = next_child; + } +} + +/** + * e_tree_model_node_traverse_preorder: + * @model: + * @path: + * @func: + * @data: + * + * + **/ +void +e_tree_model_node_traverse_preorder (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data) +{ + ETreePath child; + + g_return_if_fail (model != NULL); + g_return_if_fail (E_IS_TREE_MODEL (model)); + g_return_if_fail (path != NULL); + + child = e_tree_model_node_get_first_child (model, path); + + while (child) { + ETreePath next_child; + + if (func (model, child, data) == TRUE) + return; + + next_child = e_tree_model_node_get_next (model, child); + e_tree_model_node_traverse_preorder (model, child, func, data); + + child = next_child; + } +} + |