[evolution] Prevent "message selected" timeouts from piling up.



commit a9bdc7c5dccb80c2c9ca1c5b4a03f6988c7d863e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Mar 12 11:37:54 2010 -0500

    Prevent "message selected" timeouts from piling up.

 mail/e-mail-reader.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 1a7df0e..9fa6ea0 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -1986,13 +1986,19 @@ mail_reader_message_selected_cb (EMailReader *reader,
 	if (!store_async && priv->retrieving_message_operation_id > 0)
 		mail_msg_cancel (priv->retrieving_message_operation_id);
 
-	/* Then cancel the seen timer. */
+	/* Cancel the seen timer. */
 	message_list = MESSAGE_LIST (e_mail_reader_get_message_list (reader));
 	if (message_list && message_list->seen_id) {
 		g_source_remove (message_list->seen_id);
 		message_list->seen_id = 0;
 	}
 
+	/* Cancel the message selected timer. */
+	if (priv->message_selected_timeout_id > 0) {
+		g_source_remove (priv->message_selected_timeout_id);
+		priv->message_selected_timeout_id = 0;
+	}
+
 	source_id = g_timeout_add (
 		100, (GSourceFunc)
 		mail_reader_message_selected_timeout_cb, reader);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]