aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/message-list.c10
2 files changed, 12 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6e96fb15ba..6e49d73270 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2005-02-21 Not Zed <NotZed@Ximian.com>
+ ** 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 <NotZed@Ximian.com>
+
** See bug #72337
* mail-component.c (store_info_new, store_info_unref): refcount
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;