From 87b025c4001863c8f62f1412f5be21aa3a31ecd9 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 23 Feb 2005 06:11:20 +0000 Subject: ** See bug #64987 2005-02-21 Not Zed ** See bug #64987 * message-list.c (message_list_select_thread): select the paths with one call. (on_selection_changed_cmd): get the cursor_uid from the cursor. svn path=/trunk/; revision=28856 --- mail/ChangeLog | 8 ++++++++ mail/message-list.c | 10 ++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 6e96fb15ba..6e49d73270 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2005-02-21 Not Zed + + ** See bug #64987 + + * message-list.c (message_list_select_thread): select the paths + with one call. + (on_selection_changed_cmd): get the cursor_uid from the cursor. + 2005-02-21 Not Zed ** See bug #72337 diff --git a/mail/message-list.c b/mail/message-list.c index 1b88080d48..12ceb2e089 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -740,7 +740,6 @@ message_list_select_thread (MessageList *message_list) { ETreeSelectionModel *etsm; thread_select_info_t tsi; - int i; tsi.ml = message_list; tsi.paths = g_ptr_array_new (); @@ -748,14 +747,10 @@ message_list_select_thread (MessageList *message_list) etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree); e_tree_selected_path_foreach (message_list->tree, thread_select_foreach, &tsi); - - for (i = 0; i < tsi.paths->len; i++) - e_tree_selection_model_add_to_selection (etsm, tsi.paths->pdata[i]); - + e_tree_selection_model_select_paths(etsm, tsi.paths); g_ptr_array_free (tsi.paths, TRUE); } - /** * message_list_invert_selection: * @message_list: Message List widget @@ -2927,12 +2922,15 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml) { GPtrArray *uids; char *newuid; + ETreePath cursor; /* not sure if we could just ignore this for the cursor, i think sometimes you only get a selection changed when you should also get a cursor activated? */ uids = message_list_get_selected(ml); if (uids->len == 1) newuid = uids->pdata[0]; + else if ((cursor = e_tree_get_cursor(tree))) + newuid = (char *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor)); else newuid = NULL; -- cgit v1.2.3