[evolution] EHTMLEditorView - Opening a draft that was not created in composer should respect the wrap/don't wra



commit d18d74ea70087d3c7468dbb621f26c8e7ef6a34c
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Jun 8 15:59:33 2016 +0200

    EHTMLEditorView - Opening a draft that was not created in composer should respect the wrap/don't wrap 
preference
    
    Otherwise doing anything similar to:
    
    mv `git format-patch HEAD^` ~/.local/share/evolution/mail/local/.Drafts/new/
    
    will always end wrapped and some spaces could be replaced with non-breaking spaces

 e-util/e-html-editor-view.c |   24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index cf3d492..3375b71 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -7403,25 +7403,21 @@ parse_html_into_blocks (EHTMLEditorView *view,
                WEBKIT_DOM_HTML_ELEMENT (parent), "", NULL);
 
        if (!block_template) {
-               if (WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (parent)) {
-                       gboolean use_paragraphs;
-                       GSettings *settings;
+               gboolean use_paragraphs;
+               GSettings *settings;
 
-                       settings = e_util_ref_settings ("org.gnome.evolution.mail");
-
-                       use_paragraphs = g_settings_get_boolean (
-                               settings, "composer-wrap-quoted-text-in-replies");
+               settings = e_util_ref_settings ("org.gnome.evolution.mail");
 
-                       if (use_paragraphs)
-                               block_template = e_html_editor_selection_get_paragraph_element (
-                                       selection, document, -1, 0);
-                       else
-                               block_template = webkit_dom_document_create_element (document, "pre", NULL);
+               use_paragraphs = g_settings_get_boolean (
+                       settings, "composer-wrap-quoted-text-in-replies");
 
-                       g_object_unref (settings);
-               } else
+               if (use_paragraphs)
                        block_template = e_html_editor_selection_get_paragraph_element (
                                selection, document, -1, 0);
+               else
+                       block_template = webkit_dom_document_create_element (document, "pre", NULL);
+
+               g_object_unref (settings);
        }
 
        prev_br = html;


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