diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-tree-model.c | 13 | ||||
-rw-r--r-- | e-util/e-tree-model.h | 2 |
2 files changed, 15 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) { diff --git a/e-util/e-tree-model.h b/e-util/e-tree-model.h index c6ed8c8799..08a397cb31 100644 --- a/e-util/e-tree-model.h +++ b/e-util/e-tree-model.h @@ -65,6 +65,7 @@ struct _ETreeModelInterface { ETreePath path); gboolean (*is_expandable) (ETreeModel *tree_model, ETreePath path); + guint (*get_n_nodes) (ETreeModel *tree_model); guint (*get_n_children) (ETreeModel *tree_model, ETreePath path); guint (*depth) (ETreeModel *tree_model, @@ -147,6 +148,7 @@ gboolean e_tree_model_node_is_root (ETreeModel *tree_model, ETreePath path); gboolean e_tree_model_node_is_expandable (ETreeModel *tree_model, ETreePath path); +guint e_tree_model_node_get_n_nodes (ETreeModel *tree_model); guint e_tree_model_node_get_n_children (ETreeModel *tree_model, ETreePath path); |