[evolution] I#162 - Replied to message marked as seen after message send ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#162 - Replied to message marked as seen after message send ][
- Date: Tue, 20 Nov 2018 15:05:02 +0000 (UTC)
commit 0bc72135017cb3c80b9245fc95f6601fa4a69d8c
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 20 16:03:18 2018 +0100
I#162 - Replied to message marked as seen after message send ][
Added option which defaults to the previous behaviour. To change it run:
gsettings set org.gnome.evolution.mail composer-mark-read-on-reply false
Related to https://gitlab.gnome.org/GNOME/evolution/issues/162
data/org.gnome.evolution.mail.gschema.xml.in | 5 +++++
src/mail/em-composer-utils.c | 20 ++++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index 9c2504633c..9eed9abb72 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -249,6 +249,11 @@
<_summary>Convert UTC time in reply credits to local time</_summary>
<_description>Whether the time in reply credits should be converted to local time when it’s in UTC in
the message.</_description>
</key>
+ <key name="composer-mark-read-on-reply" type="b">
+ <default>true</default>
+ <_summary>Mark replied to messages as read</_summary>
+ <_description>When replying to a message and marking it as being replied to, then whether also mark it
as read.</_description>
+ </key>
<key name="display-content-disposition-inline" type="b">
<default>true</default>
<_summary>Whether to obey Content-Disposition:inline message header hint</_summary>
diff --git a/src/mail/em-composer-utils.c b/src/mail/em-composer-utils.c
index 76f6e9bdd6..3613c6de54 100644
--- a/src/mail/em-composer-utils.c
+++ b/src/mail/em-composer-utils.c
@@ -3859,6 +3859,22 @@ alt_reply_context_free (gpointer ptr)
}
}
+static guint32
+get_composer_mark_read_on_reply_flag (void)
+{
+ GSettings *settings;
+ guint32 res = 0;
+
+ settings = e_util_ref_settings ("org.gnome.evolution.mail");
+
+ if (g_settings_get_boolean (settings, "composer-mark-read-on-reply"))
+ res = CAMEL_MESSAGE_SEEN;
+
+ g_object_unref (settings);
+
+ return res;
+}
+
static void
alt_reply_composer_created_cb (GObject *source_object,
GAsyncResult *result,
@@ -3937,7 +3953,7 @@ alt_reply_composer_created_cb (GObject *source_object,
if (source_folder_uri) {
e_msg_composer_set_source_headers (composer, source_folder_uri,
- source_message_uid, CAMEL_MESSAGE_ANSWERED);
+ source_message_uid, CAMEL_MESSAGE_ANSWERED |
get_composer_mark_read_on_reply_flag ());
}
g_free (source_folder_uri);
@@ -4615,7 +4631,7 @@ em_utils_reply_to_message (EMsgComposer *composer,
g_object_unref (source);
}
- flags = CAMEL_MESSAGE_ANSWERED;
+ flags = CAMEL_MESSAGE_ANSWERED | get_composer_mark_read_on_reply_flag ();
if (!address && (type == E_MAIL_REPLY_TO_FROM || type == E_MAIL_REPLY_TO_SENDER) &&
folder && !emcu_folder_is_inbox (folder) && em_utils_folder_is_sent (registry, folder))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]