aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-08-14 21:18:03 +0800
committerTomas Popela <tpopela@redhat.com>2014-08-14 21:18:03 +0800
commit7d03d60431cdb4d670adf0681edd8b613a895607 (patch)
tree70417465e6a001d7ae0a3cd8e49adc98283cbef5
parent32f222cadb2fed88f111eeb1622802ab684662b2 (diff)
downloadgsoc2013-evolution-7d03d60431cdb4d670adf0681edd8b613a895607.tar.gz
gsoc2013-evolution-7d03d60431cdb4d670adf0681edd8b613a895607.tar.zst
gsoc2013-evolution-7d03d60431cdb4d670adf0681edd8b613a895607.zip
EHTMLEditorView - Fix changing of the format from the list to the Address and Heading 1 - 6 formats
-rw-r--r--e-util/e-html-editor-selection.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 5141b08956..f3f2ed5fdf 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -2187,6 +2187,7 @@ out:
static void
format_change_list_to_block (EHTMLEditorSelection *selection,
EHTMLEditorSelectionBlockFormat format,
+ const gchar *value,
WebKitDOMDocument *document)
{
gboolean after_end = FALSE;
@@ -2221,13 +2222,11 @@ format_change_list_to_block (EHTMLEditorSelection *selection,
if (!after_end) {
if (format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH)
- element = e_html_editor_selection_get_paragraph_element (selection, document, -1, 0);
- else if (format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_PRE)
- element = webkit_dom_document_create_element (document, "PRE", NULL);
- else if (format == E_HTML_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE)
- element = webkit_dom_document_create_element (document, "BLOCKQUOTE", NULL);
+ element = e_html_editor_selection_get_paragraph_element (
+ selection, document, -1, 0);
else
- element = e_html_editor_selection_get_paragraph_element (selection, document, -1, 0);
+ element = webkit_dom_document_create_element (
+ document, value, NULL);
after_end = webkit_dom_node_contains (next_item, WEBKIT_DOM_NODE (selection_end));
@@ -2360,7 +2359,7 @@ e_html_editor_selection_set_block_format (EHTMLEditorSelection *selection,
format_change_block_to_block (selection, format, view, value, document);
if (from_list && !to_list)
- format_change_list_to_block (selection, format, document);
+ format_change_list_to_block (selection, format, value, document);
if (!from_list && to_list)
format_change_block_to_list (selection, format, view, document);