[evolution/wip/webkit-composer: 277/966] Preliminary port of composer to EEditor.



commit e542270242557af5fa03a2dc8801d9c212200853
Author: Dan Vrátil <dvratil redhat com>
Date:   Tue Aug 28 18:18:22 2012 +0200

    Preliminary port of composer to EEditor.

 composer/e-composer-actions.c                      |   72 +-
 composer/e-composer-actions.h                      |   84 +-
 composer/e-composer-activity.c                     |   18 +-
 composer/e-composer-private.c                      |  140 +-
 composer/e-msg-composer.c                          |  337 ++--
 composer/e-msg-composer.h                          |   13 +-
 .../evolution-util/evolution-util-docs.sgml        |    1 -
 .../evolution-util/evolution-util-sections.txt     |   68 -
 doc/reference/evolution-util/evolution-util.types  |    1 -
 e-util/Makefile.am                                 |    2 -
 e-util/e-util.h                                    |    1 -
 e-util/e-web-view-gtkhtml.c                        | 2314 --------------------
 e-util/e-web-view-gtkhtml.h                        |  209 --
 modules/mail/e-mail-shell-backend.c                |    4 +-
 modules/mail/em-composer-prefs.c                   |    2 +-
 15 files changed, 381 insertions(+), 2885 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 82315c6..2f8d6df 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -79,20 +79,24 @@ static void
 action_pgp_encrypt_cb (GtkToggleAction *action,
                        EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static void
 action_pgp_sign_cb (GtkToggleAction *action,
                     EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static void
@@ -143,12 +147,14 @@ static void
 action_save_cb (GtkAction *action,
                 EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        const gchar *filename;
        gint fd;
        GError *error = NULL;
 
-       filename = gtkhtml_editor_get_filename (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       filename = e_editor_get_filename (editor);
        if (filename == NULL) {
                gtk_action_activate (ACTION (SAVE_AS));
                return;
@@ -178,7 +184,7 @@ action_save_cb (GtkAction *action,
        } else
                close (fd);
 
-       if (!gtkhtml_editor_save (editor, filename, TRUE, &error)) {
+       if (!e_editor_save (editor, filename, TRUE, &error)) {
                e_alert_submit (
                        E_ALERT_SINK (composer),
                        E_ALERT_NO_SAVE_FILE,
@@ -187,13 +193,15 @@ action_save_cb (GtkAction *action,
                return;
        }
 
-       gtkhtml_editor_run_command (GTKHTML_EDITOR (composer), "saved");
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static void
 action_save_as_cb (GtkAction *action,
                    EMsgComposer *composer)
 {
+       EEditor *editor;
        GtkWidget *dialog;
        gchar *filename;
        gint response;
@@ -217,8 +225,9 @@ action_save_as_cb (GtkAction *action,
        if (response != GTK_RESPONSE_OK)
                goto exit;
 
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
        filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
-       gtkhtml_editor_set_filename (GTKHTML_EDITOR (composer), filename);
+       e_editor_set_filename (editor, filename);
        g_free (filename);
 
        gtk_action_activate (ACTION (SAVE));
@@ -245,20 +254,24 @@ static void
 action_smime_encrypt_cb (GtkToggleAction *action,
                          EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static void
 action_smime_sign_cb (GtkToggleAction *action,
                       EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static GtkActionEntry entries[] = {
@@ -441,15 +454,15 @@ e_composer_actions_init (EMsgComposer *composer)
 {
        GtkActionGroup *action_group;
        GtkUIManager *ui_manager;
-       GtkhtmlEditor *editor;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        gboolean visible;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = GTKHTML_EDITOR (composer);
-       web_view = e_msg_composer_get_web_view (composer);
-       ui_manager = gtkhtml_editor_get_ui_manager (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       ui_manager = e_editor_get_ui_manager (editor);
 
        /* Composer Actions */
        action_group = composer->priv->composer_actions;
@@ -493,23 +506,24 @@ e_composer_actions_init (EMsgComposer *composer)
                ACTION (SAVE_DRAFT), "short-label", _("Save Draft"), NULL);
 
        g_object_bind_property (
-               composer, "html-mode",
+               editor_widget, "mode",
                ACTION (PICTURE_GALLERY), "sensitive",
                G_BINDING_SYNC_CREATE);
 
+       /* FIXME WEBKIT Make sure this works */
        g_object_bind_property (
-               web_view, "editable",
-               GTKHTML_EDITOR_ACTION_EDIT_MENU (editor), "sensitive",
+               editor_widget, "editable",
+               e_editor_get_action (editor, "edit"), "sensitive",
                G_BINDING_SYNC_CREATE);
 
        g_object_bind_property (
-               web_view, "editable",
-               GTKHTML_EDITOR_ACTION_FORMAT_MENU (editor), "sensitive",
+               editor_widget, "editable",
+               e_editor_get_action (editor, "format"), "sensitive",
                G_BINDING_SYNC_CREATE);
 
        g_object_bind_property (
-               web_view, "editable",
-               GTKHTML_EDITOR_ACTION_INSERT_MENU (editor), "sensitive",
+               editor_widget, "editable",
+               e_editor_get_action (editor, "insert"), "sensitive",
                G_BINDING_SYNC_CREATE);
 
 #if defined (HAVE_NSS)
diff --git a/composer/e-composer-actions.h b/composer/e-composer-actions.h
index 611154e..4eef032 100644
--- a/composer/e-composer-actions.h
+++ b/composer/e-composer-actions.h
@@ -17,48 +17,48 @@
 #ifndef E_COMPOSER_ACTIONS_H
 #define E_COMPOSER_ACTIONS_H
 
-#define E_COMPOSER_ACTION(composer, name) \
-       (gtkhtml_editor_get_action (GTKHTML_EDITOR (composer), (name)))
+#define E_COMPOSER_ACTION(editor, name) \
+       (e_editor_get_action (E_EDITOR (editor), (name)))
 
-#define E_COMPOSER_ACTION_ATTACH(composer) \
-       E_COMPOSER_ACTION ((composer), "attach")
-#define E_COMPOSER_ACTION_CLOSE(composer) \
-       E_COMPOSER_ACTION ((composer), "close")
-#define E_COMPOSER_ACTION_PGP_ENCRYPT(composer) \
-       E_COMPOSER_ACTION ((composer), "pgp-encrypt")
-#define E_COMPOSER_ACTION_PGP_SIGN(composer) \
-       E_COMPOSER_ACTION ((composer), "pgp-sign")
-#define E_COMPOSER_ACTION_PICTURE_GALLERY(composer) \
-       E_COMPOSER_ACTION ((composer), "picture-gallery")
-#define E_COMPOSER_ACTION_PRINT(composer) \
-       E_COMPOSER_ACTION ((composer), "print")
-#define E_COMPOSER_ACTION_PRINT_PREVIEW(composer) \
-       E_COMPOSER_ACTION ((composer), "print-preview")
-#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(composer) \
-       E_COMPOSER_ACTION ((composer), "prioritize-message")
-#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(composer) \
-       E_COMPOSER_ACTION ((composer), "request-read-receipt")
-#define E_COMPOSER_ACTION_SAVE(composer) \
-       E_COMPOSER_ACTION ((composer), "save")
-#define E_COMPOSER_ACTION_SAVE_AS(composer) \
-       E_COMPOSER_ACTION ((composer), "save-as")
-#define E_COMPOSER_ACTION_SAVE_DRAFT(composer) \
-       E_COMPOSER_ACTION ((composer), "save-draft")
-#define E_COMPOSER_ACTION_SECURITY_MENU(composer) \
-       E_COMPOSER_ACTION ((composer), "security-menu")
-#define E_COMPOSER_ACTION_SEND(composer) \
-       E_COMPOSER_ACTION ((composer), "send")
-#define E_COMPOSER_ACTION_NEW_MESSAGE(composer) \
-       E_COMPOSER_ACTION ((composer), "new-message")
-#define E_COMPOSER_ACTION_SMIME_ENCRYPT(composer) \
-       E_COMPOSER_ACTION ((composer), "smime-encrypt")
-#define E_COMPOSER_ACTION_SMIME_SIGN(composer) \
-       E_COMPOSER_ACTION ((composer), "smime-sign")
-#define E_COMPOSER_ACTION_VIEW_BCC(composer) \
-       E_COMPOSER_ACTION ((composer), "view-bcc")
-#define E_COMPOSER_ACTION_VIEW_CC(composer) \
-       E_COMPOSER_ACTION ((composer), "view-cc")
-#define E_COMPOSER_ACTION_VIEW_REPLY_TO(composer) \
-       E_COMPOSER_ACTION ((composer), "view-reply-to")
+#define E_COMPOSER_ACTION_ATTACH(editor) \
+       E_COMPOSER_ACTION ((editor), "attach")
+#define E_COMPOSER_ACTION_CLOSE(editor) \
+       E_COMPOSER_ACTION ((editor), "close")
+#define E_COMPOSER_ACTION_PGP_ENCRYPT(editor) \
+       E_COMPOSER_ACTION ((editor), "pgp-encrypt")
+#define E_COMPOSER_ACTION_PGP_SIGN(editor) \
+       E_COMPOSER_ACTION ((editor), "pgp-sign")
+#define E_COMPOSER_ACTION_PICTURE_GALLERY(editor) \
+       E_COMPOSER_ACTION ((editor), "picture-gallery")
+#define E_COMPOSER_ACTION_PRINT(editor) \
+       E_COMPOSER_ACTION ((editor), "print")
+#define E_COMPOSER_ACTION_PRINT_PREVIEW(editor) \
+       E_COMPOSER_ACTION ((editor), "print-preview")
+#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(editor) \
+       E_COMPOSER_ACTION ((editor), "prioritize-message")
+#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(editor) \
+       E_COMPOSER_ACTION ((editor), "request-read-receipt")
+#define E_COMPOSER_ACTION_SAVE(editor) \
+       E_COMPOSER_ACTION ((editor), "save")
+#define E_COMPOSER_ACTION_SAVE_AS(editor) \
+       E_COMPOSER_ACTION ((editor), "save-as")
+#define E_COMPOSER_ACTION_SAVE_DRAFT(editor) \
+       E_COMPOSER_ACTION ((editor), "save-draft")
+#define E_COMPOSER_ACTION_SECURITY_MENU(editor) \
+       E_COMPOSER_ACTION ((editor), "security-menu")
+#define E_COMPOSER_ACTION_SEND(editor) \
+       E_COMPOSER_ACTION ((editor), "send")
+#define E_COMPOSER_ACTION_NEW_MESSAGE(editor) \
+       E_COMPOSER_ACTION ((editor), "new-message")
+#define E_COMPOSER_ACTION_SMIME_ENCRYPT(editor) \
+       E_COMPOSER_ACTION ((editor), "smime-encrypt")
+#define E_COMPOSER_ACTION_SMIME_SIGN(editor) \
+       E_COMPOSER_ACTION ((editor), "smime-sign")
+#define E_COMPOSER_ACTION_VIEW_BCC(editor) \
+       E_COMPOSER_ACTION ((editor), "view-bcc")
+#define E_COMPOSER_ACTION_VIEW_CC(editor) \
+       E_COMPOSER_ACTION ((editor), "view-cc")
+#define E_COMPOSER_ACTION_VIEW_REPLY_TO(editor) \
+       E_COMPOSER_ACTION ((editor), "view-reply-to")
 
 #endif /* E_COMPOSER_ACTIONS_H */
diff --git a/composer/e-composer-activity.c b/composer/e-composer-activity.c
index 513915f..98ca646 100644
--- a/composer/e-composer-activity.c
+++ b/composer/e-composer-activity.c
@@ -45,14 +45,16 @@ composer_activity_lock_interface (EComposerActivity *activity)
 {
        GtkActionGroup *action_group;
        EMsgComposer *composer;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        gboolean editable;
 
        composer = e_composer_activity_get_composer (activity);
 
-       web_view = e_msg_composer_get_web_view (composer);
-       editable = e_web_view_gtkhtml_get_editable (web_view);
-       e_web_view_gtkhtml_set_editable (web_view, FALSE);
+       editor = e_msg_composer_get_editor (composer);
+       editor_widget = e_editor_get_editor_widget (editor);
+       editable = webkit_web_view_get_editable (WEBKIT_WEB_VIEW (editor_widget));
+       webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
        activity->priv->saved_editable = editable;
 
        action_group = composer->priv->async_actions;
@@ -64,14 +66,16 @@ composer_activity_unlock_interface (EComposerActivity *activity)
 {
        GtkActionGroup *action_group;
        EMsgComposer *composer;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        gboolean editable;
 
        composer = e_composer_activity_get_composer (activity);
 
        editable = activity->priv->saved_editable;
-       web_view = e_msg_composer_get_web_view (composer);
-       e_web_view_gtkhtml_set_editable (web_view, editable);
+       editor = e_msg_composer_get_editor (composer);
+       editor_widget = e_editor_get_editor_widget (editor);
+       webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), editable);
 
        action_group = composer->priv->async_actions;
        gtk_action_group_set_sensitive (action_group, TRUE);
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 786faba..f6f2b27 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -30,12 +30,14 @@
 static void
 composer_setup_charset_menu (EMsgComposer *composer)
 {
+       EEditor *editor;
        GtkUIManager *ui_manager;
        const gchar *path;
        GList *list;
        guint merge_id;
 
-       ui_manager = gtkhtml_editor_get_ui_manager (GTKHTML_EDITOR (composer));
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       ui_manager = e_editor_get_ui_manager (editor);
        path = "/main-menu/options-menu/charset-menu";
        merge_id = gtk_ui_manager_new_merge_id (ui_manager);
 
@@ -57,6 +59,7 @@ composer_setup_charset_menu (EMsgComposer *composer)
        gtk_ui_manager_ensure_update (ui_manager);
 }
 
+/* FIXME WEBKIT We don't need to control this anymore....
 static void
 msg_composer_url_requested_cb (GtkHTML *html,
                                const gchar *uri,
@@ -77,8 +80,8 @@ msg_composer_url_requested_cb (GtkHTML *html,
                mime_part = g_hash_table_lookup (hash_table, uri);
        }
 
-       /* If this is not an inline image request,
-        * allow the signal emission to continue. */
+       // If this is not an inline image request,
+       // allow the signal emission to continue. 
        if (mime_part == NULL)
                return;
 
@@ -94,26 +97,29 @@ msg_composer_url_requested_cb (GtkHTML *html,
 
        g_object_unref (camel_stream);
 
-       /* gtk_html_end() destroys the GtkHTMLStream, so we need to
-        * stop the signal emission so nothing else tries to use it. */
+       // gtk_html_end() destroys the GtkHTMLStream, so we need to
+       // stop the signal emission so nothing else tries to use it.
        g_signal_stop_emission_by_name (html, "url-requested");
 }
+*/
 
 static void
 composer_update_gallery_visibility (EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GtkToggleAction *toggle_action;
        gboolean gallery_active;
-       gboolean html_mode;
+       EEditorWidgetMode mode;
 
-       editor = GTKHTML_EDITOR (composer);
-       html_mode = gtkhtml_editor_get_html_mode (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       mode = e_editor_widget_get_mode (editor_widget);
 
        toggle_action = GTK_TOGGLE_ACTION (ACTION (PICTURE_GALLERY));
        gallery_active = gtk_toggle_action_get_active (toggle_action);
 
-       if (html_mode && gallery_active) {
+       if ((mode == E_EDITOR_WIDGET_MODE_HTML) && gallery_active) {
                gtk_widget_show (composer->priv->gallery_scrolled_window);
                gtk_widget_show (composer->priv->gallery_icon_view);
        } else {
@@ -143,9 +149,9 @@ e_composer_private_constructed (EMsgComposer *composer)
        EMsgComposerPrivate *priv = composer->priv;
        EFocusTracker *focus_tracker;
        EShell *shell;
-       EWebViewGtkHTML *web_view;
        EClientCache *client_cache;
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GtkUIManager *ui_manager;
        GtkAction *action;
        GtkWidget *container;
@@ -158,14 +164,14 @@ e_composer_private_constructed (EMsgComposer *composer)
        gint ii;
        GError *error = NULL;
 
-       editor = GTKHTML_EDITOR (composer);
-       ui_manager = gtkhtml_editor_get_ui_manager (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       ui_manager = e_editor_get_ui_manager (editor);
+       editor_widget = e_editor_get_editor_widget (editor);
 
        settings = g_settings_new ("org.gnome.evolution.mail");
 
        shell = e_msg_composer_get_shell (composer);
        client_cache = e_shell_get_client_cache (shell);
-       web_view = e_msg_composer_get_web_view (composer);
 
        /* Each composer window gets its own window group. */
        window = GTK_WINDOW (composer);
@@ -216,21 +222,22 @@ e_composer_private_constructed (EMsgComposer *composer)
 
        focus_tracker = e_focus_tracker_new (GTK_WINDOW (composer));
 
-       action = gtkhtml_editor_get_action (editor, "cut");
+       action = e_editor_get_action (editor, "cut");
        e_focus_tracker_set_cut_clipboard_action (focus_tracker, action);
 
-       action = gtkhtml_editor_get_action (editor, "copy");
+       action = e_editor_get_action (editor, "copy");
        e_focus_tracker_set_copy_clipboard_action (focus_tracker, action);
 
-       action = gtkhtml_editor_get_action (editor, "paste");
+       action = e_editor_get_action (editor, "paste");
        e_focus_tracker_set_paste_clipboard_action (focus_tracker, action);
 
-       action = gtkhtml_editor_get_action (editor, "select-all");
+       action = e_editor_get_action (editor, "select-all");
        e_focus_tracker_set_select_all_action (focus_tracker, action);
 
        priv->focus_tracker = focus_tracker;
 
-       container = editor->vbox;
+       container = gtk_hbox_new (FALSE, 0);
+       e_editor_window_pack_above (E_EDITOR_WINDOW (composer), container);
 
        /* Construct the activity bar. */
 
@@ -267,7 +274,7 @@ e_composer_private_constructed (EMsgComposer *composer)
        gtk_widget_show (widget);
 
        g_object_bind_property (
-               web_view, "editable",
+               editor_widget, "editable",
                widget, "editable",
                G_BINDING_SYNC_CREATE);
 
@@ -291,13 +298,6 @@ e_composer_private_constructed (EMsgComposer *composer)
        priv->gallery_scrolled_window = g_object_ref_sink (widget);
        gtk_widget_show (widget);
 
-       /* Reparent the scrolled window containing the GtkHTML widget
-        * into the content area of the top attachment pane. */
-
-       widget = GTK_WIDGET (web_view);
-       widget = gtk_widget_get_parent (widget);
-       gtk_widget_reparent (widget, container);
-
        /* Construct the picture gallery. */
 
        container = priv->gallery_scrolled_window;
@@ -319,7 +319,9 @@ e_composer_private_constructed (EMsgComposer *composer)
                G_CALLBACK (composer_update_gallery_visibility), composer);
 
        /* XXX What is this for? */
+       /* FIXME WEBKIT Yes, what is this for?
        g_object_set_data (G_OBJECT (composer), "vbox", editor->vbox);
+       */
 
        /* Bind headers to their corresponding actions. */
 
@@ -371,10 +373,11 @@ e_composer_private_constructed (EMsgComposer *composer)
         *     we'll stop the signal emission to prevent EWebView from
         *     launching an async operation.  Messy, but works until we
         *     switch to WebKit.  --mbarnes */
-
+       /* FIXME WEBKIT So...we don't need this anymore, right?
        g_signal_connect (
                web_view, "url-requested",
                G_CALLBACK (msg_composer_url_requested_cb), composer);
+       */
 
        g_object_unref (settings);
 }
@@ -610,7 +613,9 @@ gboolean
 e_composer_paste_html (EMsgComposer *composer,
                        GtkClipboard *clipboard)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
+       EEditorSelection *editor_selection;
        gchar *html;
 
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
@@ -619,8 +624,10 @@ e_composer_paste_html (EMsgComposer *composer,
        html = e_clipboard_wait_for_html (clipboard);
        g_return_val_if_fail (html != NULL, FALSE);
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_insert_html (editor, html);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       editor_selection = e_editor_widget_get_selection (editor_widget);
+       e_editor_selection_insert_html (editor_selection, html);
 
        g_free (html);
 
@@ -631,7 +638,8 @@ gboolean
 e_composer_paste_image (EMsgComposer *composer,
                         GtkClipboard *clipboard)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        EAttachmentStore *store;
        EAttachmentView *view;
        GdkPixbuf *pixbuf = NULL;
@@ -643,7 +651,6 @@ e_composer_paste_image (EMsgComposer *composer,
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
        g_return_val_if_fail (GTK_IS_CLIPBOARD (clipboard), FALSE);
 
-       editor = GTKHTML_EDITOR (composer);
        view = e_msg_composer_get_attachment_view (composer);
        store = e_attachment_view_get_store (view);
 
@@ -673,9 +680,14 @@ e_composer_paste_image (EMsgComposer *composer,
 
        /* In HTML mode, paste the image into the message body.
         * In text mode, add the image to the attachment store. */
-       if (gtkhtml_editor_get_html_mode (editor))
-               gtkhtml_editor_insert_image (editor, uri);
-       else {
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML) {
+               EEditorSelection *selection;
+
+               selection = e_editor_widget_get_selection (editor_widget);
+               e_editor_selection_insert_image (selection, uri);
+       } else {
                EAttachment *attachment;
 
                attachment = e_attachment_new_for_uri (uri);
@@ -705,7 +717,9 @@ gboolean
 e_composer_paste_text (EMsgComposer *composer,
                        GtkClipboard *clipboard)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
+       EEditorSelection *editor_selection;
        gchar *text;
 
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
@@ -714,8 +728,10 @@ e_composer_paste_text (EMsgComposer *composer,
        text = gtk_clipboard_wait_for_text (clipboard);
        g_return_val_if_fail (text != NULL, FALSE);
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_insert_text (editor, text);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       editor_selection = e_editor_widget_get_selection (editor_widget);
+       e_editor_selection_insert_text (editor_selection, text);
 
        g_free (text);
 
@@ -863,6 +879,8 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
                             GAsyncResult *result,
                             EMsgComposer *composer)
 {
+       /* FIXME WEBKIT Uuuhm, yeah...we don't support signatures yet */
+#if 0
        GString *html_buffer = NULL;
        GtkhtmlEditor *editor;
        gchar *contents = NULL;
@@ -876,15 +894,15 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
        e_mail_signature_combo_box_load_selected_finish (
                combo_box, result, &contents, &length, &is_html, &error);
 
-       /* FIXME Use an EAlert here. */
+       // FIXME Use an EAlert here.
        if (error != NULL) {
                g_warning ("%s: %s", G_STRFUNC, error->message);
                g_error_free (error);
                goto exit;
        }
 
-       /* "Edit as New Message" sets "priv->is_from_message".
-        * Always put the signature at the bottom for that case. */
+       // "Edit as New Message" sets "priv->is_from_message".
+       //Always put the signature at the bottom for that case. 
        top_signature =
                use_top_signature (composer) &&
                !composer->priv->is_from_message;
@@ -908,7 +926,7 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
 
        html_buffer = g_string_sized_new (1024);
 
-       /* The combo box active ID is the signature's ESource UID. */
+       // The combo box active ID is the signature's ESource UID.
        active_id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (combo_box));
 
        if (active_id != NULL && *active_id != '\0')
@@ -930,10 +948,9 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
        if (!is_html)
                g_string_append (html_buffer, "<PRE>\n");
 
-       /* The signature dash convention ("-- \n") is specified
-        * in the "Son of RFC 1036", section 4.3.2.
-        * http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
-        */
+       // The signature dash convention ("-- \n") is specified
+       //in the "Son of RFC 1036", section 4.3.2.
+       //http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
        if (add_signature_delimiter (composer)) {
                const gchar *delim;
                const gchar *delim_nl;
@@ -946,11 +963,11 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
                        delim_nl = "\n-- \n";
                }
 
-               /* Skip the delimiter if the signature already has one. */
+               // Skip the delimiter if the signature already has one.
                if (g_ascii_strncasecmp (contents, delim, strlen (delim)) == 0)
-                       ;  /* skip */
+                       ;  // skip
                else if (e_util_strstrcase (contents, delim_nl) != NULL)
-                       ;  /* skip */
+                       ;  // skip
                else
                        g_string_append (html_buffer, delim);
        }
@@ -969,12 +986,12 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
        g_free (contents);
 
 insert:
-       /* Remove the old signature and insert the new one. */
+       // Remove the old signature and insert the new one.
 
        editor = GTKHTML_EDITOR (composer);
 
-       /* This prevents our command before/after callbacks from
-        * screwing around with the signature as we insert it. */
+       // This prevents our command before/after callbacks from
+          screwing around with the signature as we insert it.
        composer->priv->in_signature_insert = TRUE;
 
        gtkhtml_editor_freeze (editor);
@@ -1006,7 +1023,7 @@ insert:
                g_string_free (html_buffer, TRUE);
 
        } else if (top_signature) {
-               /* Insert paragraph after the signature ClueFlow stuff. */
+               // Insert paragraph after the signature ClueFlow stuff. 
                if (gtkhtml_editor_run_command (editor, "cursor-forward"))
                        gtkhtml_editor_run_command (editor, "insert-paragraph");
        }
@@ -1019,6 +1036,7 @@ insert:
 
 exit:
        g_object_unref (composer);
+#endif
 }
 
 static gboolean
@@ -1030,13 +1048,14 @@ is_null_or_none (const gchar *text)
 void
 e_composer_update_signature (EMsgComposer *composer)
 {
+       /* FIXME WEBKIT As said above...no signatures yet
        EComposerHeaderTable *table;
        EMailSignatureComboBox *combo_box;
        const gchar *signature_uid;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       /* Do nothing if we're redirecting a message. */
+       // Do nothing if we're redirecting a message.
        if (composer->priv->redirect)
                return;
 
@@ -1056,13 +1075,14 @@ e_composer_update_signature (EMsgComposer *composer)
 
        combo_box = e_composer_header_table_get_signature_combo_box (table);
 
-       /* XXX Signature files should be local and therefore load quickly,
-        *     so while we do load them asynchronously we don't allow for
-        *     user cancellation and we keep the composer alive until the
-        *     asynchronous loading is complete. */
+       //XXX Signature files should be local and therefore load quickly,
+       //      so while we do load them asynchronously we don't allow for
+       //      user cancellation and we keep the composer alive until the
+       //      asynchronous loading is complete.
        e_mail_signature_combo_box_load_selected (
                combo_box, G_PRIORITY_DEFAULT, NULL,
                (GAsyncReadyCallback) composer_load_signature_cb,
                g_object_ref (composer));
+       */
 }
 
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 55e7881..ebdc536 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -35,6 +35,7 @@
 #include <unistd.h>
 #include <ctype.h>
 #include <fcntl.h>
+#include <enchant/enchant.h>
 
 #include "e-composer-private.h"
 
@@ -42,6 +43,8 @@
 #include <em-format/e-mail-parser.h>
 #include <em-format/e-mail-formatter-quote.h>
 
+#include <e-util/e-spell-checker.h>
+
 #include <shell/e-shell.h>
 
 typedef struct _AsyncContext AsyncContext;
@@ -133,7 +136,7 @@ static void e_msg_composer_alert_sink_init  (EAlertSinkInterface *iface);
 G_DEFINE_TYPE_WITH_CODE (
        EMsgComposer,
        e_msg_composer,
-       GTKHTML_TYPE_EDITOR,
+       E_TYPE_EDITOR_WINDOW,
        G_IMPLEMENT_INTERFACE (
                E_TYPE_ALERT_SINK, e_msg_composer_alert_sink_init)
        G_IMPLEMENT_INTERFACE (E_TYPE_EXTENSIBLE, NULL))
@@ -1082,7 +1085,6 @@ composer_build_message (EMsgComposer *composer,
        EMsgComposerPrivate *priv;
        GSimpleAsyncResult *simple;
        AsyncContext *context;
-       GtkhtmlEditor *editor;
        EAttachmentView *view;
        EAttachmentStore *store;
        EComposerHeaderTable *table;
@@ -1103,7 +1105,6 @@ composer_build_message (EMsgComposer *composer,
        gint i;
 
        priv = composer->priv;
-       editor = GTKHTML_EDITOR (composer);
        table = e_msg_composer_get_header_table (composer);
        view = e_msg_composer_get_attachment_view (composer);
        store = e_attachment_view_get_store (view);
@@ -1235,11 +1236,14 @@ composer_build_message (EMsgComposer *composer,
 
        } else {
                gchar *text;
-               gsize length;
+               EEditor *editor;
+               EEditorWidget *editor_widget;
 
+               editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+               editor_widget = e_editor_get_editor_widget (editor);
                data = g_byte_array_new ();
-               text = gtkhtml_editor_get_text_plain (editor, &length);
-               g_byte_array_append (data, (guint8 *) text, (guint) length);
+               text = e_editor_widget_get_text_plain (editor_widget);
+               g_byte_array_append (data, (guint8 *) text, strlen (text));
                g_free (text);
 
                type = camel_content_type_new ("text", "plain");
@@ -1302,20 +1306,29 @@ composer_build_message (EMsgComposer *composer,
                gchar *text;
                gsize length;
                gboolean pre_encode;
+               EEditor *editor;
+               EEditorWidget *editor_widget;
 
                clear_current_images (composer);
 
+               /* FIXME WEBKIT Can this go away?
                if (flags & COMPOSER_FLAG_SAVE_OBJECT_DATA)
                        gtkhtml_editor_run_command (editor, "save-data-on");
+               */
 
+               editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+               editor_widget = e_editor_get_editor_widget (editor);
                data = g_byte_array_new ();
-               text = gtkhtml_editor_get_text_html (editor, &length);
+               text = e_editor_widget_get_text_html (editor_widget);
+               length = strlen (text);
                g_byte_array_append (data, (guint8 *) text, (guint) length);
                pre_encode = text_requires_quoted_printable (text, length);
                g_free (text);
 
+               /* FIXME WEBKIT And this as well?
                if (flags & COMPOSER_FLAG_SAVE_OBJECT_DATA)
                        gtkhtml_editor_run_command (editor, "save-data-off");
+               */
 
                mem_stream = camel_stream_mem_new_with_byte_array (data);
                stream = camel_stream_filter_new (mem_stream);
@@ -1493,7 +1506,8 @@ use_top_signature (EMsgComposer *composer)
        return top_signature;
 }
 
-#define NO_SIGNATURE_TEXT \
+/* FIXME WEBKIT Nope....*/
+#define NO_SIGNATURE_TEXT      \
        "<!--+GtkHTML:<DATA class=\"ClueFlow\" " \
        "                     key=\"signature\" " \
        "                   value=\"1\">-->" \
@@ -1507,6 +1521,8 @@ set_editor_text (EMsgComposer *composer,
                  gboolean set_signature)
 {
        gchar *body = NULL;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
        g_return_if_fail (text != NULL);
@@ -1535,7 +1551,9 @@ set_editor_text (EMsgComposer *composer,
                body = g_strdup_printf ("%s<BR>", text);
        }
 
-       gtkhtml_editor_set_text_html (GTKHTML_EDITOR (composer), body, -1);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_text_html (editor_widget, body);
 
        if (set_signature)
                e_composer_update_signature (composer);
@@ -1548,12 +1566,14 @@ set_editor_text (EMsgComposer *composer,
 static void
 attachment_store_changed_cb (EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
        /* Mark the editor as changed so it prompts about unsaved
         * changes on close. */
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 }
 
 static void
@@ -1648,11 +1668,13 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
                                          gint n_targets,
                                          EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
-       gboolean html_mode;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
+       EEditorWidgetMode mode;
 
-       editor = GTKHTML_EDITOR (composer);
-       html_mode = gtkhtml_editor_get_html_mode (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       mode = e_editor_widget_get_mode (editor_widget);
 
        /* Order is important here to ensure common use cases are
         * handled correctly.  See GNOME bug #603715 for details. */
@@ -1663,7 +1685,7 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
        }
 
        /* Only paste HTML content in HTML mode. */
-       if (html_mode) {
+       if (mode == E_EDITOR_WIDGET_MODE_HTML) {
                if (e_targets_include_html (targets, n_targets)) {
                        e_composer_paste_html (composer, clipboard);
                        return;
@@ -1682,7 +1704,7 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
 }
 
 static void
-msg_composer_paste_clipboard_cb (EWebViewGtkHTML *web_view,
+msg_composer_paste_clipboard_cb (EEditorWidget *web_view,
                                  EMsgComposer *composer)
 {
        GtkClipboard *clipboard;
@@ -1696,6 +1718,7 @@ msg_composer_paste_clipboard_cb (EWebViewGtkHTML *web_view,
        g_signal_stop_emission_by_name (web_view, "paste-clipboard");
 }
 
+/* FIXME WEBKIT Is this still valid problem? */
 static void
 msg_composer_realize_gtkhtml_cb (GtkWidget *widget,
                                  EMsgComposer *composer)
@@ -1712,8 +1735,10 @@ msg_composer_realize_gtkhtml_cb (GtkWidget *widget,
 
        /* When redirecting a message, the message body is not
         * editable and therefore cannot be a drag destination. */
+       /*
        if (!e_web_view_gtkhtml_get_editable (E_WEB_VIEW_GTKHTML (widget)))
                return;
+       */
 
        view = e_msg_composer_get_attachment_view (composer);
 
@@ -1755,9 +1780,16 @@ msg_composer_drag_data_received_cb (GtkWidget *widget,
                                     EMsgComposer *composer)
 {
        EAttachmentView *view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
+       EEditorWidgetMode mode;
+
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       mode = e_editor_widget_get_mode (editor_widget);
 
        /* HTML mode has a few special cases for drops... */
-       if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer))) {
+       if (mode == E_EDITOR_WIDGET_MODE_HTML) {
 
                /* If we're receiving an image, we want the image to be
                 * inserted in the message body.  Let GtkHtml handle it. */
@@ -1788,10 +1820,12 @@ msg_composer_drag_data_received_cb (GtkWidget *widget,
 static void
 msg_composer_notify_header_cb (EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, TRUE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed(editor_widget, TRUE);
 }
 
 static gboolean
@@ -1954,27 +1988,27 @@ static void
 msg_composer_constructed (GObject *object)
 {
        EShell *shell;
-       GtkhtmlEditor *editor;
        EMsgComposer *composer;
        EAttachmentView *view;
        EAttachmentStore *store;
        EComposerHeaderTable *table;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GtkUIManager *ui_manager;
        GtkToggleAction *action;
        GSettings *settings;
        const gchar *id;
        gboolean active;
 
-       editor = GTKHTML_EDITOR (object);
        composer = E_MSG_COMPOSER (object);
 
        shell = e_msg_composer_get_shell (composer);
 
        e_composer_private_constructed (composer);
 
-       web_view = e_msg_composer_get_web_view (composer);
-       ui_manager = gtkhtml_editor_get_ui_manager (editor);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       ui_manager = e_editor_get_ui_manager (editor);
        view = e_msg_composer_get_attachment_view (composer);
        table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
 
@@ -2016,21 +2050,21 @@ msg_composer_constructed (GObject *object)
        /* Clipboard Support */
 
        g_signal_connect (
-               web_view, "paste-clipboard",
+               editor_widget, "paste-clipboard",
                G_CALLBACK (msg_composer_paste_clipboard_cb), composer);
 
        /* Drag-and-Drop Support */
 
        g_signal_connect (
-               web_view, "realize",
+               editor_widget, "realize",
                G_CALLBACK (msg_composer_realize_gtkhtml_cb), composer);
 
        g_signal_connect (
-               web_view, "drag-motion",
+               editor_widget, "drag-motion",
                G_CALLBACK (msg_composer_drag_motion_cb), composer);
 
        g_signal_connect (
-               web_view, "drag-data-received",
+               editor_widget, "drag-data-received",
                G_CALLBACK (msg_composer_drag_data_received_cb), composer);
 
        g_signal_connect (
@@ -2079,7 +2113,7 @@ msg_composer_constructed (GObject *object)
                G_CALLBACK (attachment_store_changed_cb), composer);
 
        /* Initialization may have tripped the "changed" state. */
-       gtkhtml_editor_set_changed (editor, FALSE);
+       e_editor_widget_set_changed (editor_widget, FALSE);
 
        id = "org.gnome.evolution.composer";
        e_plugin_ui_register_manager (ui_manager, id, composer);
@@ -2121,6 +2155,8 @@ msg_composer_map (GtkWidget *widget)
 {
        EComposerHeaderTable *table;
        GtkWidget *input_widget;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        const gchar *text;
 
        /* Chain up to parent's map() method. */
@@ -2149,7 +2185,9 @@ msg_composer_map (GtkWidget *widget)
        }
 
        /* Jump to the editor as a last resort. */
-       gtkhtml_editor_run_command (GTKHTML_EDITOR (widget), "grab-focus");
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (widget));
+       editor_widget = e_editor_get_editor_widget (editor);
+       gtk_widget_grab_focus (GTK_WIDGET (editor_widget));
 }
 
 static gboolean
@@ -2158,12 +2196,12 @@ msg_composer_key_press_event (GtkWidget *widget,
 {
        EMsgComposer *composer;
        GtkWidget *input_widget;
-       GtkhtmlEditor *editor;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (widget);
        composer = E_MSG_COMPOSER (widget);
-       web_view = e_msg_composer_get_web_view (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
 
        input_widget =
                e_composer_header_table_get_header (
@@ -2183,12 +2221,12 @@ msg_composer_key_press_event (GtkWidget *widget,
        }
 
        if (event->keyval == GDK_KEY_Tab && gtk_widget_is_focus (input_widget)) {
-               gtkhtml_editor_run_command (editor, "grab-focus");
+               gtk_widget_grab_focus (GTK_WIDGET (editor_widget));
                return TRUE;
        }
 
        if (event->keyval == GDK_KEY_ISO_Left_Tab &&
-               gtk_widget_is_focus (GTK_WIDGET (web_view))) {
+               gtk_widget_is_focus (GTK_WIDGET (editor_widget))) {
                gtk_widget_grab_focus (input_widget);
                return TRUE;
        }
@@ -2199,33 +2237,36 @@ msg_composer_key_press_event (GtkWidget *widget,
 }
 
 static void
-msg_composer_cut_clipboard (GtkhtmlEditor *editor)
+msg_composer_cut_clipboard (EMsgComposer *composer)
 {
        /* Do nothing.  EFocusTracker handles this. */
 }
 
 static void
-msg_composer_copy_clipboard (GtkhtmlEditor *editor)
+msg_composer_copy_clipboard (EMsgComposer *composer)
 {
        /* Do nothing.  EFocusTracker handles this. */
 }
 
 static void
-msg_composer_paste_clipboard (GtkhtmlEditor *editor)
+msg_composer_paste_clipboard (EMsgComposer *composer)
 {
        /* Do nothing.  EFocusTracker handles this. */
 }
 
 static void
-msg_composer_select_all (GtkhtmlEditor *editor)
+msg_composer_select_all (EMsgComposer *composer)
 {
        /* Do nothing.  EFocusTracker handles this. */
 }
 
+/* FIXME WEBKIT We can effectively hack around this by DOM manipulation
+ * when inserting signature, right?..or when is this usefull ?? */
 static void
-msg_composer_command_before (GtkhtmlEditor *editor,
+msg_composer_command_before (EMsgComposer *composer,
                              const gchar *command)
 {
+       /*
        EMsgComposer *composer;
        const gchar *data;
 
@@ -2249,12 +2290,14 @@ msg_composer_command_before (GtkhtmlEditor *editor,
                gtkhtml_editor_run_command (editor, "text-default-color");
                gtkhtml_editor_run_command (editor, "italic-off");
        }
+       */
 }
 
 static void
-msg_composer_command_after (GtkhtmlEditor *editor,
+msg_composer_command_after (EMsgComposer *composer,
                             const gchar *command)
 {
+       /*
        EMsgComposer *composer;
        const gchar *data;
 
@@ -2277,7 +2320,7 @@ msg_composer_command_after (GtkhtmlEditor *editor,
        if (data == NULL || *data != '1')
                return;
 
-       /* Clear the signature. */
+       // Clear the signature.
        if (gtkhtml_editor_is_paragraph_empty (editor))
                gtkhtml_editor_set_paragraph_data (editor, "signature" ,"0");
 
@@ -2290,19 +2333,17 @@ msg_composer_command_after (GtkhtmlEditor *editor,
 
        gtkhtml_editor_run_command (editor, "text-default-color");
        gtkhtml_editor_run_command (editor, "italic-off");
+       */
 }
 
 static gchar *
-msg_composer_image_uri (GtkhtmlEditor *editor,
+msg_composer_image_uri (EMsgComposer *composer,
                         const gchar *uri)
 {
-       EMsgComposer *composer;
        GHashTable *hash_table;
        CamelMimePart *part;
        const gchar *cid;
 
-       composer = E_MSG_COMPOSER (editor);
-
        hash_table = composer->priv->inline_images_by_url;
        part = g_hash_table_lookup (hash_table, uri);
 
@@ -2328,9 +2369,11 @@ msg_composer_image_uri (GtkhtmlEditor *editor,
        return g_strconcat ("cid:", cid, NULL);
 }
 
+/* FIXME WEBKIT We don't need this, do we? */
 static void
-msg_composer_object_deleted (GtkhtmlEditor *editor)
+msg_composer_object_deleted (EMsgComposer *composer)
 {
+       /*
        const gchar *data;
 
        if (!gtkhtml_editor_is_paragraph_empty (editor))
@@ -2350,6 +2393,7 @@ msg_composer_object_deleted (GtkhtmlEditor *editor)
        data = gtkhtml_editor_get_paragraph_data (editor, "signature");
        if (data != NULL && *data == '1')
                gtkhtml_editor_set_paragraph_data (editor, "signature", "0");
+       */
 }
 
 static gboolean
@@ -2403,37 +2447,25 @@ msg_composer_accumulator_false_abort (GSignalInvocationHint *ihint,
 }
 
 static void
-e_msg_composer_class_init (EMsgComposerClass *class)
+e_msg_composer_class_init (EMsgComposerClass *klass)
 {
        GObjectClass *object_class;
        GtkWidgetClass *widget_class;
-       GtkhtmlEditorClass *editor_class;
 
-       g_type_class_add_private (class, sizeof (EMsgComposerPrivate));
+       g_type_class_add_private (klass, sizeof (EMsgComposerPrivate));
 
-       object_class = G_OBJECT_CLASS (class);
+       object_class = G_OBJECT_CLASS (klass);
        object_class->set_property = msg_composer_set_property;
        object_class->get_property = msg_composer_get_property;
        object_class->dispose = msg_composer_dispose;
        object_class->finalize = msg_composer_finalize;
        object_class->constructed = msg_composer_constructed;
 
-       widget_class = GTK_WIDGET_CLASS (class);
+       widget_class = GTK_WIDGET_CLASS (klass);
        widget_class->map = msg_composer_map;
        widget_class->key_press_event = msg_composer_key_press_event;
 
-       editor_class = GTKHTML_EDITOR_CLASS (class);
-       editor_class->cut_clipboard = msg_composer_cut_clipboard;
-       editor_class->copy_clipboard = msg_composer_copy_clipboard;
-       editor_class->paste_clipboard = msg_composer_paste_clipboard;
-       editor_class->select_all = msg_composer_select_all;
-       editor_class->command_before = msg_composer_command_before;
-       editor_class->command_after = msg_composer_command_after;
-       editor_class->image_uri = msg_composer_image_uri;
-       editor_class->link_clicked = NULL; /* EWebView handles this */
-       editor_class->object_deleted = msg_composer_object_deleted;
-
-       class->presend = msg_composer_presend;
+       klass->presend = msg_composer_presend;
 
        g_object_class_install_property (
                object_class,
@@ -2458,7 +2490,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 
        signals[PRESEND] = g_signal_new (
                "presend",
-               G_OBJECT_CLASS_TYPE (class),
+               G_OBJECT_CLASS_TYPE (klass),
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (EMsgComposerClass, presend),
                msg_composer_accumulator_false_abort,
@@ -2468,7 +2500,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 
        signals[SEND] = g_signal_new (
                "send",
-               G_OBJECT_CLASS_TYPE (class),
+               G_OBJECT_CLASS_TYPE (klass),
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (EMsgComposerClass, send),
                NULL, NULL,
@@ -2479,7 +2511,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 
        signals[SAVE_TO_DRAFTS] = g_signal_new (
                "save-to-drafts",
-               G_OBJECT_CLASS_TYPE (class),
+               G_OBJECT_CLASS_TYPE (klass),
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (EMsgComposerClass, save_to_drafts),
                NULL, NULL,
@@ -2490,7 +2522,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 
        signals[SAVE_TO_OUTBOX] = g_signal_new (
                "save-to-outbox",
-               G_OBJECT_CLASS_TYPE (class),
+               G_OBJECT_CLASS_TYPE (klass),
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (EMsgComposerClass, save_to_outbox),
                NULL, NULL,
@@ -2501,7 +2533,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 
        signals[PRINT] = g_signal_new (
                "print",
-               G_OBJECT_CLASS_TYPE (class),
+               G_OBJECT_CLASS_TYPE (klass),
                G_SIGNAL_RUN_LAST,
                0, NULL, NULL,
                e_marshal_VOID__ENUM_OBJECT_OBJECT,
@@ -2538,7 +2570,7 @@ e_msg_composer_new (EShell *shell)
 
        return g_object_new (
                E_TYPE_MSG_COMPOSER,
-               "html", e_web_view_gtkhtml_new (), "shell", shell, NULL);
+               "shell", shell, NULL);
 }
 
 EFocusTracker *
@@ -3009,6 +3041,7 @@ handle_multipart (EMsgComposer *composer,
 static void
 set_signature_gui (EMsgComposer *composer)
 {
+       /*FIXME WEBKIT We don't support signatures yet....
        GtkhtmlEditor *editor;
        EComposerHeaderTable *table;
        EMailSignatureComboBox *combo_box;
@@ -3027,10 +3060,11 @@ set_signature_gui (EMsgComposer *composer)
        if (!g_str_has_prefix (data, "uid:"))
                return;
 
-       /* The combo box active ID is the signature's ESource UID. */
+       // The combo box active ID is the signature's ESource UID.
        uid = e_composer_decode_clue_value (data + 4);
        gtk_combo_box_set_active_id (GTK_COMBO_BOX (combo_box), uid);
        g_free (uid);
+       */
 }
 
 static void
@@ -3110,6 +3144,8 @@ e_msg_composer_new_with_message (EShell *shell,
        EMsgComposerPrivate *priv;
        EComposerHeaderTable *table;
        ESource *source = NULL;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GtkToggleAction *action;
        struct _camel_header_raw *xev;
        gchar *identity_uid;
@@ -3132,6 +3168,8 @@ e_msg_composer_new_with_message (EShell *shell,
        composer = e_msg_composer_new (shell);
        priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
        table = e_msg_composer_get_header_table (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
 
        if (postto) {
                e_composer_header_table_set_post_to_list (table, postto);
@@ -3259,11 +3297,11 @@ e_msg_composer_new_with_message (EShell *shell,
                flags = g_strsplit (format, ", ", 0);
                for (i = 0; flags[i]; i++) {
                        if (g_ascii_strcasecmp (flags[i], "text/html") == 0) {
-                               gtkhtml_editor_set_html_mode (
-                                       GTKHTML_EDITOR (composer), TRUE);
+                               e_editor_widget_set_mode (
+                                       editor_widget, E_EDITOR_WIDGET_MODE_HTML);
                        } else if (g_ascii_strcasecmp (flags[i], "text/plain") == 0) {
-                               gtkhtml_editor_set_html_mode (
-                                       GTKHTML_EDITOR (composer), FALSE);
+                               e_editor_widget_set_mode (
+                                       editor_widget, E_EDITOR_WIDGET_MODE_PLAIN_TEXT);
                        } else if (g_ascii_strcasecmp (flags[i], "pgp-sign") == 0) {
                                action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
                                gtk_toggle_action_set_active (action, TRUE);
@@ -3403,7 +3441,8 @@ e_msg_composer_new_redirect (EShell *shell,
 {
        EMsgComposer *composer;
        EComposerHeaderTable *table;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        const gchar *subject;
 
        g_return_val_if_fail (E_IS_SHELL (shell), NULL);
@@ -3421,8 +3460,9 @@ e_msg_composer_new_redirect (EShell *shell,
        e_composer_header_table_set_identity_uid (table, identity_uid);
        e_composer_header_table_set_subject (table, subject);
 
-       web_view = e_msg_composer_get_web_view (composer);
-       e_web_view_gtkhtml_set_editable (web_view, FALSE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
 
        return composer;
 }
@@ -3474,27 +3514,19 @@ e_msg_composer_get_shell (EMsgComposer *composer)
 }
 
 /**
- * e_msg_composer_get_web_view:
+ * e_msg_composer_get_editor:
  * @composer: an #EMsgComposer
  *
- * Returns the #EWebView widget in @composer.
+ * Returns the #EEditor widget in @composer.
  *
- * Returns: the #EWebView
+ * Returns: the #EEditor
  **/
-EWebViewGtkHTML *
-e_msg_composer_get_web_view (EMsgComposer *composer)
+EEditor *
+e_msg_composer_get_editor (EMsgComposer *composer)
 {
-       GtkHTML *html;
-       GtkhtmlEditor *editor;
-
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-       /* This is a convenience function to avoid
-        * repeating this awkwardness everywhere */
-       editor = GTKHTML_EDITOR (composer);
-       html = gtkhtml_editor_get_html (editor);
-
-       return E_WEB_VIEW_GTKHTML (html);
+       return e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
 }
 
 static void
@@ -3504,7 +3536,8 @@ msg_composer_send_cb (EMsgComposer *composer,
 {
        CamelMimeMessage *message;
        EAlertSink *alert_sink;
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GError *error = NULL;
 
        alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3536,8 +3569,9 @@ msg_composer_send_cb (EMsgComposer *composer,
        g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
 
        /* The callback can set editor 'changed' if anything failed. */
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, FALSE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, TRUE);
 
        g_signal_emit (
                composer, signals[SEND], 0,
@@ -3599,7 +3633,8 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer,
 {
        CamelMimeMessage *message;
        EAlertSink *alert_sink;
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GError *error = NULL;
 
        alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3640,8 +3675,9 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer,
        g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
 
        /* The callback can set editor 'changed' if anything failed. */
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, FALSE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, FALSE);
 
        g_signal_emit (
                composer, signals[SAVE_TO_DRAFTS],
@@ -3699,7 +3735,8 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer,
 {
        CamelMimeMessage *message;
        EAlertSink *alert_sink;
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GError *error = NULL;
 
        alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3734,9 +3771,9 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer,
 
        async_context_free (context);
 
-       /* XXX This should be elsewhere. */
-       editor = GTKHTML_EDITOR (composer);
-       gtkhtml_editor_set_changed (editor, FALSE);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       e_editor_widget_set_changed (editor_widget, FALSE);
 }
 
 /**
@@ -4226,13 +4263,16 @@ e_msg_composer_set_body (EMsgComposer *composer,
 {
        EMsgComposerPrivate *priv = composer->priv;
        EComposerHeaderTable *table;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        ESource *source;
        const gchar *identity_uid;
        gchar *buff;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
        table = e_msg_composer_get_header_table (composer);
 
        identity_uid = e_composer_header_table_get_identity_uid (table);
@@ -4245,10 +4285,8 @@ e_msg_composer_set_body (EMsgComposer *composer,
        set_editor_text (composer, buff, FALSE);
        g_free (buff);
 
-       gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), FALSE);
-
-       web_view = e_msg_composer_get_web_view (composer);
-       e_web_view_gtkhtml_set_editable (web_view, FALSE);
+       e_editor_widget_set_mode (editor_widget, E_EDITOR_WIDGET_MODE_PLAIN_TEXT);
+       webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
 
        g_free (priv->mime_body);
        priv->mime_body = g_strdup (body);
@@ -4604,16 +4642,21 @@ e_msg_composer_get_message (EMsgComposer *composer,
        GSimpleAsyncResult *simple;
        GtkAction *action;
        ComposerFlags flags = 0;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+
        simple = g_simple_async_result_new (
                G_OBJECT (composer), callback,
                user_data, e_msg_composer_get_message);
 
        g_simple_async_result_set_check_cancellable (simple, cancellable);
 
-       if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer)))
+       if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML)
                flags |= COMPOSER_FLAG_HTML_CONTENT;
 
        action = ACTION (PRIORITIZE_MESSAGE);
@@ -4730,6 +4773,8 @@ e_msg_composer_get_message_draft (EMsgComposer *composer,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data)
 {
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GSimpleAsyncResult *simple;
        ComposerFlags flags = COMPOSER_FLAG_DRAFT;
        GtkAction *action;
@@ -4742,7 +4787,9 @@ e_msg_composer_get_message_draft (EMsgComposer *composer,
 
        g_simple_async_result_set_check_cancellable (simple, cancellable);
 
-       if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer)))
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+       if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML)
                flags |= COMPOSER_FLAG_HTML_CONTENT;
 
        action = ACTION (PRIORITIZE_MESSAGE);
@@ -4872,17 +4919,19 @@ e_msg_composer_get_reply_to (EMsgComposer *composer)
 GByteArray *
 e_msg_composer_get_raw_message_text (EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        GByteArray *array;
        gchar *text;
-       gsize length;
 
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
+
        array = g_byte_array_new ();
-       editor = GTKHTML_EDITOR (composer);
-       text = gtkhtml_editor_get_text_plain (editor, &length);
-       g_byte_array_append (array, (guint8 *) text, (guint) length);
+       text = e_editor_widget_get_text_plain (editor_widget);
+       g_byte_array_append (array, (guint8 *) text, strlen (text));
        g_free (text);
 
        return array;
@@ -4915,22 +4964,24 @@ e_msg_composer_can_close (EMsgComposer *composer,
                           gboolean can_save_draft)
 {
        gboolean res = FALSE;
-       GtkhtmlEditor *editor;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        EComposerHeaderTable *table;
        GdkWindow *window;
        GtkWidget *widget;
        const gchar *subject;
        gint response;
 
-       editor = GTKHTML_EDITOR (composer);
        widget = GTK_WIDGET (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
 
        /* this means that there is an async operation running,
         * in which case the composer cannot be closed */
        if (!gtk_action_group_get_sensitive (composer->priv->async_actions))
                return FALSE;
 
-       if (!gtkhtml_editor_get_changed (editor))
+       if (!e_editor_widget_get_changed (editor_widget))
                return TRUE;
 
        window = gtk_widget_get_window (widget);
@@ -4969,6 +5020,8 @@ e_msg_composer_can_close (EMsgComposer *composer,
 void
 e_msg_composer_reply_indent (EMsgComposer *composer)
 {
+       /* FIXME WEBKIT We already have indentation implementation. Why
+        * is this done? 
        GtkhtmlEditor *editor;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -4990,6 +5043,7 @@ e_msg_composer_reply_indent (EMsgComposer *composer)
        gtkhtml_editor_run_command (editor, "indent-zero");
        gtkhtml_editor_run_command (editor, "text-default-color");
        gtkhtml_editor_run_command (editor, "italic-off");
+       */
 }
 
 EComposerHeaderTable *
@@ -5009,10 +5063,10 @@ e_msg_composer_get_attachment_view (EMsgComposer *composer)
 }
 
 GList *
-e_load_spell_languages (void)
+e_load_spell_languages (ESpellChecker *spell_checker)
 {
        GSettings *settings;
-       GList *spell_languages = NULL;
+       GList *spell_dicts = NULL;
        gchar **strv;
        gint ii;
 
@@ -5024,50 +5078,49 @@ e_load_spell_languages (void)
        /* Convert the codes to spell language structs. */
        for (ii = 0; strv[ii] != NULL; ii++) {
                gchar *language_code = strv[ii];
-               const GtkhtmlSpellLanguage *language;
+               ESpellDictionary *dict;
 
-               language = gtkhtml_spell_language_lookup (language_code);
-               if (language != NULL)
-                       spell_languages = g_list_prepend (
-                               spell_languages, (gpointer) language);
+               dict = e_spell_checker_lookup_dictionary (spell_checker, language_code);
+               if (dict != NULL)
+                       spell_dicts = g_list_prepend (
+                               spell_dicts, (gpointer) dict);
        }
 
        g_strfreev (strv);
 
-       spell_languages = g_list_reverse (spell_languages);
+       spell_dicts = g_list_reverse (spell_dicts);
 
        /* Pick a default spell language if it came back empty. */
-       if (spell_languages == NULL) {
-               const GtkhtmlSpellLanguage *language;
+       if (spell_dicts == NULL) {
+               ESpellDictionary *dict;
 
-               language = gtkhtml_spell_language_lookup (NULL);
+               dict = e_spell_checker_lookup_dictionary (spell_checker, NULL);
 
-               if (language) {
-                       spell_languages = g_list_prepend (
-                               spell_languages, (gpointer) language);
+               if (dict) {
+                       spell_dicts = g_list_prepend (
+                               spell_dicts, (gpointer) dict);
                }
        }
 
-       return spell_languages;
+       return spell_dicts;
 }
 
 void
-e_save_spell_languages (GList *spell_languages)
+e_save_spell_languages (const GList *spell_dicts)
 {
        GSettings *settings;
        GPtrArray *lang_array;
 
        /* Build a list of spell check language codes. */
        lang_array = g_ptr_array_new ();
-       while (spell_languages != NULL) {
-               const GtkhtmlSpellLanguage *language;
+       while (spell_dicts != NULL) {
+               ESpellDictionary *dict = spell_dicts->data;
                const gchar *language_code;
 
-               language = spell_languages->data;
-               language_code = gtkhtml_spell_language_get_code (language);
+               language_code = e_spell_dictionary_get_code (dict);
                g_ptr_array_add (lang_array, (gpointer) language_code);
 
-               spell_languages = g_list_next (spell_languages);
+               spell_dicts = g_list_next (spell_dicts);
        }
 
        g_ptr_array_add (lang_array, NULL);
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 1fbc104..7816521 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -24,7 +24,6 @@
 #define E_MSG_COMPOSER_H
 
 #include <camel/camel.h>
-#include <gtkhtml-editor.h>
 #include <libebook/libebook.h>
 
 #include <shell/e-shell.h>
@@ -57,12 +56,12 @@ typedef struct _EMsgComposerClass EMsgComposerClass;
 typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
 
 struct _EMsgComposer {
-       GtkhtmlEditor parent;
+       EEditorWindow parent;
        EMsgComposerPrivate *priv;
 };
 
 struct _EMsgComposerClass {
-       GtkhtmlEditorClass parent_class;
+       EEditorWindowClass parent_class;
 
        /* Signals */
        gboolean        (*presend)              (EMsgComposer *composer);
@@ -97,8 +96,8 @@ EFocusTracker *       e_msg_composer_get_focus_tracker
                                                (EMsgComposer *composer);
 CamelSession * e_msg_composer_ref_session      (EMsgComposer *composer);
 EShell *       e_msg_composer_get_shell        (EMsgComposer *composer);
-EWebViewGtkHTML *
-               e_msg_composer_get_web_view     (EMsgComposer *composer);
+EEditor *
+               e_msg_composer_get_editor       (EMsgComposer *composer);
 
 void           e_msg_composer_send             (EMsgComposer *composer);
 void           e_msg_composer_save_to_drafts   (EMsgComposer *composer);
@@ -198,8 +197,8 @@ GByteArray *        e_msg_composer_get_raw_message_text
 
 gboolean       e_msg_composer_is_exiting       (EMsgComposer *composer);
 
-GList *                e_load_spell_languages          (void);
-void           e_save_spell_languages          (GList *spell_languages);
+GList *                e_load_spell_languages          (ESpellChecker *spell_checker);
+void           e_save_spell_languages          (const GList *spell_languages);
 
 G_END_DECLS
 
diff --git a/doc/reference/evolution-util/evolution-util-docs.sgml 
b/doc/reference/evolution-util/evolution-util-docs.sgml
index 53badcc..88a644d 100644
--- a/doc/reference/evolution-util/evolution-util-docs.sgml
+++ b/doc/reference/evolution-util/evolution-util-docs.sgml
@@ -94,7 +94,6 @@
     <title>HTML Rendering</title>
     <xi:include href="xml/e-web-view.xml"/>
     <xi:include href="xml/e-web-view-preview.xml"/>
-    <xi:include href="xml/e-web-view-gtkhtml.xml"/>
     <xi:include href="xml/e-file-request.xml"/>
     <xi:include href="xml/e-stock-request.xml"/>
   </chapter>
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt 
b/doc/reference/evolution-util/evolution-util-sections.txt
index 5f7497c..4f4a4de 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4568,74 +4568,6 @@ EWebViewPrivate
 </SECTION>
 
 <SECTION>
-<FILE>e-web-view-gtkhtml</FILE>
-<TITLE>EWebViewGtkHTML</TITLE>
-EWebViewGtkHTML
-e_web_view_gtkhtml_new
-e_web_view_gtkhtml_clear
-e_web_view_gtkhtml_load_string
-e_web_view_gtkhtml_get_animate
-e_web_view_gtkhtml_set_animate
-e_web_view_gtkhtml_get_caret_mode
-e_web_view_gtkhtml_set_caret_mode
-e_web_view_gtkhtml_get_copy_target_list
-e_web_view_gtkhtml_get_disable_printing
-e_web_view_gtkhtml_set_disable_printing
-e_web_view_gtkhtml_get_disable_save_to_disk
-e_web_view_gtkhtml_set_disable_save_to_disk
-e_web_view_gtkhtml_get_editable
-e_web_view_gtkhtml_set_editable
-e_web_view_gtkhtml_get_inline_spelling
-e_web_view_gtkhtml_set_inline_spelling
-e_web_view_gtkhtml_get_magic_links
-e_web_view_gtkhtml_set_magic_links
-e_web_view_gtkhtml_get_magic_smileys
-e_web_view_gtkhtml_set_magic_smileys
-e_web_view_gtkhtml_get_selected_uri
-e_web_view_gtkhtml_set_selected_uri
-e_web_view_gtkhtml_get_cursor_image
-e_web_view_gtkhtml_set_cursor_image
-e_web_view_gtkhtml_get_open_proxy
-e_web_view_gtkhtml_set_open_proxy
-e_web_view_gtkhtml_get_paste_target_list
-e_web_view_gtkhtml_get_print_proxy
-e_web_view_gtkhtml_set_print_proxy
-e_web_view_gtkhtml_get_save_as_proxy
-e_web_view_gtkhtml_set_save_as_proxy
-e_web_view_gtkhtml_get_action
-e_web_view_gtkhtml_get_action_group
-e_web_view_gtkhtml_extract_uri
-e_web_view_gtkhtml_copy_clipboard
-e_web_view_gtkhtml_cut_clipboard
-e_web_view_gtkhtml_is_selection_active
-e_web_view_gtkhtml_paste_clipboard
-e_web_view_gtkhtml_scroll_forward
-e_web_view_gtkhtml_scroll_backward
-e_web_view_gtkhtml_select_all
-e_web_view_gtkhtml_unselect_all
-e_web_view_gtkhtml_zoom_100
-e_web_view_gtkhtml_zoom_in
-e_web_view_gtkhtml_zoom_out
-e_web_view_gtkhtml_get_ui_manager
-e_web_view_gtkhtml_get_popup_menu
-e_web_view_gtkhtml_show_popup_menu
-e_web_view_gtkhtml_status_message
-e_web_view_gtkhtml_stop_loading
-e_web_view_gtkhtml_update_actions
-<SUBSECTION Standard>
-E_WEB_VIEW_GTKHTML
-E_IS_WEB_VIEW_GTKHTML
-E_TYPE_WEB_VIEW_GTKHTML
-E_WEB_VIEW_GTKHTML_CLASS
-E_IS_WEB_VIEW_GTKHTML_CLASS
-E_WEB_VIEW_GTKHTML_GET_CLASS
-EWebViewGtkHTMLClass
-e_web_view_gtkhtml_get_type
-<SUBSECTION Private>
-EWebViewGtkHTMLPrivate
-</SECTION>
-
-<SECTION>
 <FILE>e-web-view-preview</FILE>
 <TITLE>EWebViewPreview</TITLE>
 EWebViewPreview
diff --git a/doc/reference/evolution-util/evolution-util.types 
b/doc/reference/evolution-util/evolution-util.types
index c47d820..12bdc77 100644
--- a/doc/reference/evolution-util/evolution-util.types
+++ b/doc/reference/evolution-util/evolution-util.types
@@ -163,7 +163,6 @@ e_tree_table_adapter_get_type
 e_tree_view_frame_get_type
 e_url_entry_get_type
 e_web_view_get_type
-e_web_view_gtkhtml_get_type
 e_web_view_preview_get_type
 gal_view_collection_get_type
 gal_view_etable_get_type
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index fb9d4bc..45c251f 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -336,7 +336,6 @@ evolution_util_include_HEADERS =  \
        e-url-entry.h \
        e-util-enums.h \
        e-util-enumtypes.h \
-       e-web-view-gtkhtml.h \
        e-web-view-preview.h \
        e-web-view.h \
        e-widget-undo.h \
@@ -607,7 +606,6 @@ libevolution_util_la_SOURCES = \
        e-url-entry.c \
        e-util-enumtypes.c \
        e-util-private.h \
-       e-web-view-gtkhtml.c \
        e-web-view-preview.c \
        e-web-view.c \
        e-widget-undo.c \
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 2a78470..2804134 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -245,7 +245,6 @@
 #include <e-util/e-url-entry.h>
 #include <e-util/e-util-enums.h>
 #include <e-util/e-util-enumtypes.h>
-#include <e-util/e-web-view-gtkhtml.h>
 #include <e-util/e-web-view-preview.h>
 #include <e-util/e-web-view.h>
 #include <e-util/e-widget-undo.h>
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 4d2ee72..12b5283 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -484,6 +484,7 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
        if (E_IS_EDITOR_WINDOW (window)) {
                EEditor *editor;
                EEditorWidget *editor_widget;
+               ESpellChecker *spell_checker;
                GSettings *settings;
                GList *spell_languages;
                gboolean active = TRUE;
@@ -491,7 +492,8 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
                editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
                editor_widget = e_editor_get_editor_widget (editor);
 
-               spell_languages = e_load_spell_languages ();
+               spell_checker = e_editor_widget_get_spell_checker (editor_widget);
+               spell_languages = e_load_spell_languages (spell_checker);
 
                e_editor_widget_set_spell_languages (editor_widget, spell_languages);
                g_list_free (spell_languages);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 23cbe3a..5770dbd 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -194,7 +194,7 @@ spell_setup (EMComposerPrefs *prefs)
        available_languages =
                e_spell_checker_list_available_dicts (prefs->spell_checker);
 
-       active_languages = e_load_spell_languages ();
+       active_languages = e_load_spell_languages (prefs->spell_checker);
 
        /* Populate the GtkListStore. */
        while (available_languages != NULL) {


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