aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-10 12:47:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-10 12:47:09 +0800
commita0cf7faf1597751fe974318788fad8caffc5238c (patch)
tree740e038e6e43251f0110b8463fb32f5241e94d93
parentdf7a1be4857b4d1a8980a85c9353d5215c40719a (diff)
downloadgsoc2013-evolution-a0cf7faf1597751fe974318788fad8caffc5238c.tar.gz
gsoc2013-evolution-a0cf7faf1597751fe974318788fad8caffc5238c.tar.zst
gsoc2013-evolution-a0cf7faf1597751fe974318788fad8caffc5238c.zip
use new etreeselectionmodel api to select paths in one call. Fixes #59546.
2004-06-10 Not Zed <NotZed@Ximian.com> * message-list.c (message_list_set_selected): use new etreeselectionmodel api to select paths in one call. Fixes #59546. svn path=/trunk/; revision=26278
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/message-list.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 100aeda7fe..83333215fe 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2004-06-10 Not Zed <NotZed@Ximian.com>
+ * message-list.c (message_list_set_selected): use new
+ etreeselectionmodel api to select paths in one call. Fixes
+ #59546.
+
* em-folder-view.c (emfv_message_reply): check that we have
content selected, not just a selection, before trying to reply to
that content. #59146.
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; i<uids->len; 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