[evolution] Reset MessageList::seen_id in mail_reader_message_seen_cb()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Reset MessageList::seen_id in mail_reader_message_seen_cb()
- Date: Thu, 10 Apr 2014 16:05:54 +0000 (UTC)
commit 26ce0bb5161f6e3298c33cc1fb6e859674155863
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 10 18:03:06 2014 +0200
Reset MessageList::seen_id in mail_reader_message_seen_cb()
Otherwise invalid source ID is used in the call of g_source_remove()
when is tried to remove "pending" auto-mark-as-seen timeout callback.
It can show a runtime warning on a console too.
mail/e-mail-reader.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index a35da4d..3cc8814 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2594,6 +2594,12 @@ mail_reader_message_seen_cb (gpointer user_data)
parts = e_mail_display_get_part_list (display);
message_list = e_mail_reader_get_message_list (reader);
+ g_return_val_if_fail (IS_MESSAGE_LIST (message_list), FALSE);
+
+ /* zero the timeout id now, if it was not rescheduled */
+ if (g_source_get_id (g_main_current_source ()) == MESSAGE_LIST (message_list)->seen_id)
+ MESSAGE_LIST (message_list)->seen_id = 0;
+
if (e_tree_is_dragging (E_TREE (message_list)))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]