[evolution/wip/webkit-composer: 779/966] EEditorSelection: Fix detection of citation



commit ba595111e389676cfda6ac01e6017f2f7424e149
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Jan 23 14:42:37 2014 +0100

    EEditorSelection: Fix detection of citation
    
    With this commit the situation when Enter is pressed in citation (to break
    citation) is fixed

 e-util/e-editor-selection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 68a992b..95a2954 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -1752,7 +1752,7 @@ e_editor_selection_is_citation (EEditorSelection *selection)
        node = webkit_dom_range_get_common_ancestor_container (range, NULL);
 
        if (WEBKIT_DOM_IS_TEXT (node))
-               return FALSE;
+               return get_has_style (selection, "citation");
 
        /* If we are changing the format of block we have to re-set bold property,
         * otherwise it will be turned off because of no text in composer */
@@ -1769,7 +1769,7 @@ e_editor_selection_is_citation (EEditorSelection *selection)
        if (g_strstr_len (value, -1, "cite"))
                ret_val = TRUE;
        else
-               ret_val = FALSE;
+               ret_val = get_has_style (selection, "citation");
 
        g_free (value);
        return ret_val;


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