aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-tree-model.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-19 22:48:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-20 02:15:25 +0800
commita100a1588a2a880da482f4bbc15aa02d7abab312 (patch)
tree0704558ac3be2608da7f5facdd80ccd5a4688fa7 /e-util/e-tree-model.c
parent3ecab2f66278d486698e06d316a53f2f51670c49 (diff)
downloadgsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar.gz
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar.bz2
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar.lz
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar.xz
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.tar.zst
gsoc2013-evolution-a100a1588a2a880da482f4bbc15aa02d7abab312.zip
Add e_tree_model_node_get_n_nodes().
Returns the total number of nodes in the tree model, including hidden nodes in collapsed tree branches.
Diffstat (limited to 'e-util/e-tree-model.c')
-rw-r--r--e-util/e-tree-model.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/e-util/e-tree-model.c b/e-util/e-tree-model.c
index 85248918b2..b03824d153 100644
--- a/e-util/e-tree-model.c
+++ b/e-util/e-tree-model.c
@@ -359,6 +359,19 @@ e_tree_model_node_is_expandable (ETreeModel *tree_model,
}
guint
+e_tree_model_node_get_n_nodes (ETreeModel *tree_model)
+{
+ ETreeModelInterface *interface;
+
+ g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), 0);
+
+ interface = E_TREE_MODEL_GET_INTERFACE (tree_model);
+ g_return_val_if_fail (interface->get_n_nodes != NULL, 0);
+
+ return interface->get_n_nodes (tree_model);
+}
+
+guint
e_tree_model_node_get_n_children (ETreeModel *tree_model,
ETreePath path)
{