[evolution/wip/webkit-composer: 531/966] Fix build and disable Monospace formatting for now



commit d82cce6309bba00eccf513c7107704411c8dfa7e
Author: Dan Vrátil <dvratil redhat com>
Date:   Fri Aug 3 11:04:04 2012 +0200

    Fix build and disable Monospace formatting for now

 e-util/e-editor-selection.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 6061523..bf400bd 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -21,6 +21,7 @@
 #endif
 
 #include "e-editor-selection.h"
+#include "e-editor.h"
 
 #include <webkit/webkit.h>
 #include <webkit/webkitdom.h>
@@ -825,7 +826,6 @@ void
 e_editor_selection_set_monospaced (EEditorSelection *selection,
                                   gboolean monospaced)
 {
-       WebKitDOMDocument *document;
        WebKitDOMRange *range;
 
        g_return_if_fail (E_IS_EDITOR_SELECTION (selection));
@@ -835,22 +835,21 @@ e_editor_selection_set_monospaced (EEditorSelection *selection,
                return;
        }
 
-       document = webkit_web_view_get_dom_document (selection->priv->webview);
-
        range = editor_selection_get_current_range (selection);
        if (!range) {
                return;
        }
 
+       /* FIXME WEBKIT Although we can implement applying and
+        * removing style on our own by advanced DOM manipulation,
+        * this change will not be recorded in UNDO and REDO history
+        * TODO: Think of something..... */
        if (monospaced) {
-               WebKitDOMElement *tt;
 
-               tt = webkit_dom_document_create_element (document, "TT", NULL);
-               webkit_dom_range_surround_contents (
-                       range, WEBKIT_DOM_NODE (tt), NULL);
+               /* apply_format (selection, "TT"); */
 
        } else {
-               /* FIXME WEBKIT: this does not work yet :)
+               /* remove_format (selection, "TT"); */
        }
 
        g_object_notify (G_OBJECT (selection), "monospaced");


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