[evolution] Bug 732091 - Automatically mark message as read sometimes doesn't work
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 732091 - Automatically mark message as read sometimes doesn't work
- Date: Tue, 1 Jul 2014 14:46:55 +0000 (UTC)
commit b07c2b006e34456052fe4a1f83720c2b5a564ce8
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 1 16:45:30 2014 +0200
Bug 732091 - Automatically mark message as read sometimes doesn't work
mail/e-mail-reader.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 9dc6ed3..b63800d 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2672,9 +2672,9 @@ mail_reader_load_status_changed_cb (EMailReader *reader,
e_mail_display_get_part_list (display) &&
e_mail_view_get_preview_visible (E_MAIL_VIEW (reader))) {
if (priv->folder_was_just_selected)
- priv->folder_was_just_selected = FALSE;
+ priv->folder_was_just_selected = FALSE;
else
- schedule_timeout_mark_seen (reader);
+ schedule_timeout_mark_seen (reader);
}
}
@@ -2990,6 +2990,22 @@ mail_reader_emit_folder_loaded (EMailReader *reader)
g_signal_emit (reader, signals[FOLDER_LOADED], 0);
}
+static void
+mail_reader_message_list_built_cb (MessageList *message_list,
+ EMailReader *reader)
+{
+ EMailReaderPrivate *priv;
+
+ priv = E_MAIL_READER_GET_PRIVATE (reader);
+ mail_reader_emit_folder_loaded (reader);
+
+ /* No cursor_uid means that there will not be emitted any
+ "cursor-changed" and "message-selected" signal, thus
+ unset the "just selected folder" flag */
+ if (!message_list->cursor_uid)
+ priv->folder_was_just_selected = FALSE;
+}
+
static EAlertSink *
mail_reader_get_alert_sink (EMailReader *reader)
{
@@ -4018,9 +4034,9 @@ connect_signals:
message_list, "right-click",
G_CALLBACK (discard_timeout_mark_seen_cb), reader);
- g_signal_connect_swapped (
+ g_signal_connect_after (
message_list, "message-list-built",
- G_CALLBACK (mail_reader_emit_folder_loaded), reader);
+ G_CALLBACK (mail_reader_message_list_built_cb), reader);
g_signal_connect_swapped (
message_list, "double-click",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]