[evolution] EHTMLEditorView - Style that is used to make the links clickable is send when using Ctrl + Enter to



commit 72bad0fd95fdef81aec94ec4ea5437eccb91514e
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Feb 4 12:03:39 2015 +0100

    EHTMLEditorView - Style that is used to make the links clickable is send when using Ctrl + Enter to send 
the message
    
    Also rename the style id to sctick with other ids.

 e-util/e-html-editor-view.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index dc77b77..a4deacf 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -1736,7 +1736,7 @@ html_editor_view_set_links_active (EHTMLEditorView *view,
 
        if (active) {
                style = webkit_dom_document_get_element_by_id (
-                               document, "--evolution-editor-style-a");
+                               document, "-x-evo-style-a");
                if (style)
                        remove_node (WEBKIT_DOM_NODE (style));
        } else {
@@ -1744,7 +1744,7 @@ html_editor_view_set_links_active (EHTMLEditorView *view,
                head = webkit_dom_document_get_head (document);
 
                style = webkit_dom_document_create_element (document, "STYLE", NULL);
-               webkit_dom_element_set_id (style, "--evolution-editor-style-a");
+               webkit_dom_element_set_id (style, "-x-evo-style-a");
                webkit_dom_html_element_set_inner_text (
                        WEBKIT_DOM_HTML_ELEMENT (style), "a { cursor: text; }", NULL);
 
@@ -7104,6 +7104,11 @@ process_content_for_html (EHTMLEditorView *view)
                WEBKIT_DOM_ELEMENT (document_clone), "style#-x-evo-quote-style", NULL));
        if (node)
                remove_node (node);
+       /* When the Ctrl + Enter is pressed for sending, the links are activated. */
+       node = WEBKIT_DOM_NODE (webkit_dom_element_query_selector (
+               WEBKIT_DOM_ELEMENT (document_clone), "style#-x-evo-style-a", NULL));
+       if (node)
+               remove_node (node);
        node = WEBKIT_DOM_NODE (webkit_dom_element_query_selector (
                WEBKIT_DOM_ELEMENT (document_clone), "body", NULL));
        process_elements (view, node, TRUE, FALSE, FALSE, NULL);


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