From df7a1be4857b4d1a8980a85c9353d5215c40719a Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 10 Jun 2004 04:42:22 +0000 Subject: add new api for setting the whole selection in one go. See #59546. 2004-06-10 Not Zed * e-tree-selection-model.c (e_tree_selection_model_select_paths): add new api for setting the whole selection in one go. See #59546. svn path=/trunk/; revision=26277 --- widgets/table/e-tree-selection-model.c | 14 ++++++++++++++ widgets/table/e-tree-selection-model.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'widgets/table') diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 8aa8cb3239..6d45b6257c 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -671,6 +671,20 @@ e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); } +void +e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths) +{ + ETreePath path; + int i; + + for (i=0;ilen;i++) { + path = paths->pdata[i]; + change_one_path(etsm, path, TRUE); + } + + e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); +} + void e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath path) { diff --git a/widgets/table/e-tree-selection-model.h b/widgets/table/e-tree-selection-model.h index 0d3305b93d..44ebf08f31 100644 --- a/widgets/table/e-tree-selection-model.h +++ b/widgets/table/e-tree-selection-model.h @@ -63,6 +63,8 @@ void e_tree_selection_model_foreach (ETreeSelectionModel gpointer closure); void e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath path); +void e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths); + void e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath path); void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, -- cgit v1.2.3