aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c17
2 files changed, 18 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1f4aec0fed..bdf9f7dd1b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-13 Christopher James Lahey <clahey@ximian.com>
+
+ * message-list.c (on_cursor_activated_cmd): Only activate the
+ message if the cursor has moved.
+
2001-04-12 Christopher James Lahey <clahey@ximian.com>
* message-list.c (e_mail_address_new): Updated this function to be
diff --git a/mail/message-list.c b/mail/message-list.c
index d3ff04d649..39445a2be6 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -412,6 +412,9 @@ message_list_select (MessageList *message_list, int base_row,
vrow += direction;
}
+ g_free (message_list->cursor_uid);
+ message_list->cursor_uid = NULL;
+
gtk_signal_emit(GTK_OBJECT (message_list), message_list_signals [MESSAGE_SELECTED], NULL);
}
@@ -1978,15 +1981,21 @@ static void
on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data)
{
MessageList *message_list;
+ const char *new_uid;
message_list = MESSAGE_LIST (user_data);
- message_list->cursor_row = row;
- g_free(message_list->cursor_uid);
if (path == NULL)
- message_list->cursor_uid = NULL;
+ new_uid = NULL;
else
- message_list->cursor_uid = g_strdup(get_message_uid(message_list, path));
+ new_uid = get_message_uid(message_list, path);
+
+ if (message_list->cursor_uid != NULL && !strcmp (message_list->cursor_uid, new_uid))
+ return;
+
+ message_list->cursor_row = row;
+ g_free(message_list->cursor_uid);
+ message_list->cursor_uid = g_strdup (new_uid);
if (!message_list->idle_id) {
message_list->idle_id =