[evolution/wip/webkit-composer: 290/372] Fix empty editor when editting the signatures.



commit 626772ab618e67e3866d671dc23fbcc9152b84d9
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jul 22 17:15:20 2013 +0200

    Fix empty editor when editting the signatures.

 e-util/e-editor-widget.c         |    2 +-
 e-util/e-mail-signature-editor.c |   11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index b166f34..b539311 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -2002,7 +2002,7 @@ e_editor_widget_set_text_plain (EEditorWidget *widget,
        widget->priv->reload_in_progress = TRUE;
 
        webkit_web_view_load_string (
-               WEBKIT_WEB_VIEW (widget), text, NULL, NULL, "file://");
+               WEBKIT_WEB_VIEW (widget), text, "text/plain", NULL, "file://");
 }
 
 /**
diff --git a/e-util/e-mail-signature-editor.c b/e-util/e-mail-signature-editor.c
index f877b4a..fb9d0fc 100644
--- a/e-util/e-mail-signature-editor.c
+++ b/e-util/e-mail-signature-editor.c
@@ -102,7 +102,6 @@ mail_signature_editor_loaded_cb (GObject *object,
 {
        EEditor *editor;
        EEditorWidget *editor_widget;
-       EEditorSelection *editor_selection;
        ESource *source;
        EMailSignatureEditor *window;
        ESourceMailSignature *extension;
@@ -148,12 +147,10 @@ mail_signature_editor_loaded_cb (GObject *object,
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_html_mode (editor_widget, is_html);
 
-       editor_selection = e_editor_widget_get_selection (editor_widget);
-       if (is_html) {
-               e_editor_selection_insert_html (editor_selection, contents);
-       } else {
-               e_editor_selection_insert_text (editor_selection, contents);
-       }
+       if (is_html)
+               e_editor_widget_set_text_html (editor_widget, contents);
+       else
+               e_editor_widget_set_text_plain (editor_widget, contents);
 
        g_free (contents);
 


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