[evolution] EHTMLEditor: Set right width to paragraphs that are quoted
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditor: Set right width to paragraphs that are quoted
- Date: Wed, 11 Jun 2014 12:46:07 +0000 (UTC)
commit 1d4ee81c22ac1367c319105796a9bf66635c4a26
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jun 11 14:45:23 2014 +0200
EHTMLEditor: Set right width to paragraphs that are quoted
e-util/e-html-editor-selection.c | 7 +++----
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 a9d856e..85da125 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 9f2a61b..88de44d 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 (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]