[evolution/wip/webkit-composer] EEditorWidget: Add input event listener on BODY from convertor



commit 07aae2f8300df00ff0eeeea91ee2b837f81993cf
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Feb 27 22:45:51 2014 +0100

    EEditorWidget: Add input event listener on BODY from convertor

 e-util/e-editor-widget.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index aba6993..3989ef2 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -2242,10 +2242,18 @@ html_plain_text_convertor_load_status_changed (WebKitWebView *web_view,
                        NULL);
        }
 
-       e_editor_widget_quote_plain_text (widget);
+       body = WEBKIT_DOM_HTML_ELEMENT (e_editor_widget_quote_plain_text (widget));
        e_editor_selection_restore_caret_position (selection);
        e_editor_widget_force_spellcheck (widget);
 
+       /* Register on input event that is called when the content (body) is modified */
+       webkit_dom_event_target_add_event_listener (
+               WEBKIT_DOM_EVENT_TARGET (body),
+               "input",
+               G_CALLBACK (body_input_event_cb),
+               FALSE,
+               widget);
+
        g_free (inner_html);
        g_free (inner_text);
 }


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