[evolution/wip/webkit2] Bug 614557 - Hiding mail preview pane should stop auto-mark-seen timer
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 614557 - Hiding mail preview pane should stop auto-mark-seen timer
- Date: Thu, 3 Mar 2016 16:49:48 +0000 (UTC)
commit 3adc66f023737d99e1bbaf90c48b0140b8747e5a
Author: Milan Crha <mcrha redhat com>
Date: Mon Feb 22 14:50:55 2016 +0100
Bug 614557 - Hiding mail preview pane should stop auto-mark-seen timer
mail/e-mail-reader.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 1e993f9..87e9fbf 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2920,6 +2920,19 @@ discard_timeout_mark_seen_cb (EMailReader *reader)
return FALSE;
}
+
+static void
+mail_reader_preview_pane_visible_changed_cb (EMailReader *reader,
+ GParamSpec *param,
+ GtkWidget *widget)
+{
+ g_return_if_fail (E_IS_MAIL_READER (reader));
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ if (!gtk_widget_get_visible (widget))
+ discard_timeout_mark_seen_cb (reader);
+}
+
static void
mail_reader_remove_followup_alert (EMailReader *reader)
{
@@ -4409,6 +4422,10 @@ connect_signals:
message_list, "right-click",
G_CALLBACK (discard_timeout_mark_seen_cb), reader);
+ g_signal_connect_swapped (
+ e_mail_reader_get_preview_pane (reader), "notify::visible",
+ G_CALLBACK (mail_reader_preview_pane_visible_changed_cb), reader);
+
g_signal_connect_after (
message_list, "message-list-built",
G_CALLBACK (mail_reader_message_list_built_cb), reader);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]