[evolution] EHTMLEditorSelection - Use a faster way of quoting an element in the plain text mode
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorSelection - Use a faster way of quoting an element in the plain text mode
- Date: Wed, 1 Jun 2016 13:09:56 +0000 (UTC)
commit dc1f98103301a13b5685a68771c98f515e7045c6
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jun 1 15:02:31 2016 +0200
EHTMLEditorSelection - Use a faster way of quoting an element in the plain text mode
e-util/e-html-editor-selection.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 3e4df26..744c458 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -2476,6 +2476,7 @@ process_block_to_block (EHTMLEditorSelection *selection,
gboolean quoted = FALSE;
gboolean empty = FALSE;
gchar *content;
+ gint citation_level = 0;
WebKitDOMNode *child;
WebKitDOMElement *element;
@@ -2587,7 +2588,7 @@ process_block_to_block (EHTMLEditorSelection *selection,
if (!html_mode &&
(format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH ||
format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE)) {
- gint citation_level, quote;
+ gint quote;
if (format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE)
citation_level = 1;
@@ -2605,9 +2606,12 @@ process_block_to_block (EHTMLEditorSelection *selection,
blockquote, WEBKIT_DOM_NODE (element), NULL);
if (!html_mode)
e_html_editor_view_quote_plain_text_element_after_wrapping (document,
element, 1);
- } else
- if (!html_mode && quoted)
+ } else if (!html_mode && quoted) {
+ if (citation_level > 0)
+ e_html_editor_view_quote_plain_text_element_after_wrapping (document,
element, citation_level);
+ else
e_html_editor_view_quote_plain_text_element (view, element);
+ }
}
return after_selection_end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]