aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-04-26 04:45:03 +0800
committerChris Lahey <clahey@src.gnome.org>2002-04-26 04:45:03 +0800
commit8358adf1acfb1a3c679f9f9fa71106c037587103 (patch)
tree43904af580f7133812dcf6cbfa19af70dbf9900f
parent0a226a048384c990cb180b5f52a6c51f153252c3 (diff)
downloadgsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar.gz
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar.bz2
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar.lz
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar.xz
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.tar.zst
gsoc2013-evolution-8358adf1acfb1a3c679f9f9fa71106c037587103.zip
Made these handle the case where all_children_selected_array has a bit
2002-04-25 Christopher James Lahey <clahey@ximian.com> * e-tree-selection-model.c (etsm_selected_count_recurse, etsm_foreach_recurse): Made these handle the case where all_children_selected_array has a bit set, but the children of that node aren't filled in. svn path=/trunk/; revision=16590
-rw-r--r--widgets/table/e-tree-selection-model.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 29c641e879..c7799313f4 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -898,8 +898,11 @@ etsm_selected_count_recurse (ETreeSelectionModel *etsm,
ETreePath child = e_tree_model_node_get_first_child(E_TREE_MODEL(etsm->priv->model), path);
int i;
for (i = 0; child && i < selection_node->num_children; i++, child = e_tree_model_node_get_next(E_TREE_MODEL(etsm->priv->model), child))
- if (selection_node->children[i])
+ if (selection_node->all_children_selected_array && e_bit_array_value_at(selection_node->all_children_selected_array, i))
+ etsm_selected_count_all_recurse (etsm, child, count);
+ else if (selection_node->children[i])
etsm_selected_count_recurse (etsm, selection_node->children[i], child, count);
+
}
}
@@ -1243,7 +1246,9 @@ etsm_foreach_recurse (ETreeSelectionModel *etsm,
ETreePath child = e_tree_model_node_get_first_child(E_TREE_MODEL(etsm->priv->model), path);
int i;
for (i = 0; i < selection_node->num_children; i++, child = e_tree_model_node_get_next(E_TREE_MODEL(etsm->priv->model), child))
- if (selection_node->children[i])
+ if (selection_node->all_children_selected_array && e_bit_array_value_at(selection_node->all_children_selected_array, i))
+ etsm_foreach_all_recurse(etsm, child, callback, closure);
+ else if (selection_node->children[i])
etsm_foreach_recurse (etsm, selection_node->children[i], child, callback, closure);
}
}