[evolution] I#461 - Let 'Wrap quoted text in replies' influence paragraph style



commit 6fc3ab19054f5d7404e90e3114fce19e041a350d
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 2 18:52:58 2020 +0200

    I#461 - Let 'Wrap quoted text in replies' influence paragraph style
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/461

 src/em-format/e-mail-formatter-quote-text-plain.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/em-format/e-mail-formatter-quote-text-plain.c 
b/src/em-format/e-mail-formatter-quote-text-plain.c
index 817613d513..2e98650c35 100644
--- a/src/em-format/e-mail-formatter-quote-text-plain.c
+++ b/src/em-format/e-mail-formatter-quote-text-plain.c
@@ -52,6 +52,7 @@ emqfe_text_plain_format (EMailFormatterExtension *extension,
 {
        GOutputStream *filtered_stream;
        GOutputStream *temp_stream;
+       GSettings *settings;
        CamelMimeFilter *filter;
        CamelMimePart *mime_part;
        CamelContentType *type;
@@ -67,10 +68,18 @@ emqfe_text_plain_format (EMailFormatterExtension *extension,
        qf_context = (EMailFormatterQuoteContext *) context;
 
        text_flags =
-               CAMEL_MIME_FILTER_TOHTML_PRE |
                CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
                CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
 
+       settings = e_util_ref_settings ("org.gnome.evolution.mail");
+
+       if (g_settings_get_boolean (settings, "composer-wrap-quoted-text-in-replies"))
+               text_flags |= CAMEL_MIME_FILTER_TOHTML_DIV | CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | 
CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
+       else
+               text_flags |= CAMEL_MIME_FILTER_TOHTML_PRE;
+
+       g_clear_object (&settings);
+
        /* XXX Should we define a separate EMailFormatter property
         *     for using CAMEL_MIME_FILTER_TOHTML_QUOTE_CITATION? */
        if (e_mail_formatter_get_mark_citations (formatter))


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