[evolution] EHTMLEditorSelection - Alignment cannot be set back to left in list



commit 8415e0ae7371b70768723cc320db226e63cb6f5e
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Jun 25 08:23:23 2015 +0200

    EHTMLEditorSelection - Alignment cannot be set back to left in list

 e-util/e-html-editor-selection.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index b421c0f..24d39ca 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -1230,6 +1230,17 @@ e_html_editor_selection_get_alignment (EHTMLEditorSelection *selection)
        else
                element = webkit_dom_node_get_parent_element (node);
 
+       if (WEBKIT_DOM_IS_HTMLLI_ELEMENT (element)) {
+               if (element_has_class (element, "-x-evo-align-right"))
+                       alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_RIGHT;
+               else if (element_has_class (element, "-x-evo-align-center"))
+                       alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_CENTER;
+               else
+                       alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_LEFT;
+
+               return alignment;
+       }
+
        style = webkit_dom_element_get_style (element);
        value = webkit_dom_css_style_declaration_get_property_value (style, "text-align");
 


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