aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-13 20:10:29 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-13 20:10:29 +0800
commit68f8aa3465d51df263bc41489a985dc916c92577 (patch)
treedd11738f138eba2f3e24d0561ed0c53d688fb050
parent3b06548b39ecad5f36ee8cdf5d6d091e5dbcff97 (diff)
downloadgsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar.gz
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar.bz2
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar.lz
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar.xz
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.tar.zst
gsoc2013-evolution-68f8aa3465d51df263bc41489a985dc916c92577.zip
Only activate the message if the cursor has moved.
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. svn path=/trunk/; revision=9298
-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 =