From a0cf7faf1597751fe974318788fad8caffc5238c Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 10 Jun 2004 04:47:09 +0000 Subject: use new etreeselectionmodel api to select paths in one call. Fixes #59546. 2004-06-10 Not Zed * message-list.c (message_list_set_selected): use new etreeselectionmodel api to select paths in one call. Fixes #59546. svn path=/trunk/; revision=26278 --- mail/message-list.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mail/message-list.c') diff --git a/mail/message-list.c b/mail/message-list.c index d621281433..c332b23f1b 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -2981,14 +2981,17 @@ message_list_set_selected(MessageList *ml, GPtrArray *uids) int i; ETreeSelectionModel *etsm; ETreePath node; + GPtrArray *paths = g_ptr_array_new(); etsm = (ETreeSelectionModel *)e_tree_get_selection_model(ml->tree); - for (i=0; ilen; i++) { node = g_hash_table_lookup(ml->uid_nodemap, uids->pdata[i]); if (node) - e_tree_selection_model_add_to_selection(etsm, node); + g_ptr_array_add(paths, node); } + + e_tree_selection_model_select_paths(etsm, paths); + g_ptr_array_free(paths, TRUE); } void -- cgit v1.2.3