diff options
author | Tomas Popela <tpopela@redhat.com> | 2014-06-11 20:45:23 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2014-06-11 20:45:23 +0800 |
commit | 1d4ee81c22ac1367c319105796a9bf66635c4a26 (patch) | |
tree | ab008891d94b0f7573250c4cd15911aa28c37674 | |
parent | f96e2ff1a3538d6229ec8388bd7bbded1f748750 (diff) | |
download | gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar.gz gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar.bz2 gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar.lz gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar.xz gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.tar.zst gsoc2013-evolution-1d4ee81c22ac1367c319105796a9bf66635c4a26.zip |
EHTMLEditor: Set right width to paragraphs that are quoted
-rw-r--r-- | e-util/e-html-editor-selection.c | 7 | ||||
-rw-r--r-- | e-util/e-html-editor-view.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index a9d856eea5..85da12599d 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -1712,7 +1712,7 @@ format_change_block_to_block (EHTMLEditorSelection *selection, gint citation_level, quote; citation_level = get_citation_level (WEBKIT_DOM_NODE (element)); - quote = citation_level ? citation_level + 1 : 0; + quote = citation_level ? citation_level * 2 : 0; element = e_html_editor_selection_wrap_paragraph_length ( selection, element, selection->priv->word_wrap_length - quote); @@ -5220,7 +5220,7 @@ e_html_editor_selection_wrap_paragraphs_in_document (EHTMLEditorSelection *selec WebKitDOMNode *node = webkit_dom_node_list_item (list, ii); citation_level = get_citation_level (node); - quote = citation_level ? citation_level + 1 : 0; + quote = citation_level ? citation_level * 2 : 0; if (node_is_list (node)) { WebKitDOMNode *item = webkit_dom_node_get_first_child (node); @@ -5267,8 +5267,7 @@ e_html_editor_selection_wrap_paragraph (EHTMLEditorSelection *selection, offset = -SPACES_PER_LIST_LEVEL; } - quote = citation_level ? citation_level + 1 : 0; - quote *= 2; + quote = citation_level ? citation_level * 2 : 0; final_width = word_wrap_length - quote + offset; final_width -= SPACES_PER_INDENTATION * indentation_level; diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c index 9f2a61b106..88de44d820 100644 --- a/e-util/e-html-editor-view.c +++ b/e-util/e-html-editor-view.c @@ -2339,7 +2339,7 @@ parse_html_into_paragraphs (EHTMLEditorView *view, } else { paragraph = e_html_editor_selection_get_paragraph_element ( e_html_editor_view_get_selection (view), - document, -1, citation_level); + document, -1, 0); } if (with_br && !*rest && !citation &&!local_ignore_next_br) { @@ -2412,7 +2412,7 @@ parse_html_into_paragraphs (EHTMLEditorView *view, } else { paragraph = e_html_editor_selection_get_paragraph_element ( e_html_editor_view_get_selection (view), - document, -1, citation_level); + document, -1, 0); } webkit_dom_html_element_set_inner_html ( |