[evolution/wip/webkit-composer: 678/966] Prefer e_msg_composer_get_editor().



commit 486c1d26cdfb261a357bb3cd1016fb0920263599
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Feb 8 10:08:26 2013 -0500

    Prefer e_msg_composer_get_editor().
    
    Instead of e_editor_window_get_editor().

 composer/e-composer-actions.c                     |   14 +++---
 composer/e-composer-private.c                     |   14 +++---
 composer/e-msg-composer.c                         |   48 ++++++++++-----------
 mail/em-composer-utils.c                          |   14 ++----
 modules/composer-autosave/e-composer-autosave.c   |    2 +-
 modules/mail/e-mail-shell-backend.c               |    4 +-
 modules/settings/Makefile.am                      |    2 -
 modules/settings/evolution-module-settings.c      |    2 -
 plugins/email-custom-header/email-custom-header.c |    4 +-
 plugins/external-editor/external-editor.c         |    6 +-
 plugins/face/face.c                               |    4 +-
 plugins/templates/templates.c                     |    2 +-
 12 files changed, 51 insertions(+), 65 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 46ae7cf..5a6d17b 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -82,7 +82,7 @@ action_pgp_encrypt_cb (GtkToggleAction *action,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -94,7 +94,7 @@ action_pgp_sign_cb (GtkToggleAction *action,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -153,7 +153,7 @@ action_save_cb (GtkAction *action,
        gint fd;
        GError *error = NULL;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        filename = e_editor_get_filename (editor);
        if (filename == NULL) {
                gtk_action_activate (ACTION (SAVE_AS));
@@ -225,7 +225,7 @@ action_save_as_cb (GtkAction *action,
        if (response != GTK_RESPONSE_OK)
                goto exit;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
        e_editor_set_filename (editor, filename);
        g_free (filename);
@@ -257,7 +257,7 @@ action_smime_encrypt_cb (GtkToggleAction *action,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -269,7 +269,7 @@ action_smime_sign_cb (GtkToggleAction *action,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -460,7 +460,7 @@ e_composer_actions_init (EMsgComposer *composer)
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        ui_manager = e_editor_get_ui_manager (editor);
 
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index cc8a2bc..136a41e 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -38,7 +38,7 @@ composer_setup_charset_menu (EMsgComposer *composer)
        GList *list;
        guint merge_id;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (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);
@@ -70,7 +70,7 @@ composer_update_gallery_visibility (EMsgComposer *composer)
        gboolean gallery_active;
        gboolean is_html;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        is_html = e_editor_widget_get_html_mode (editor_widget);
 
@@ -108,7 +108,7 @@ e_composer_private_constructed (EMsgComposer *composer)
        gint ii;
        GError *error = NULL;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        ui_manager = e_editor_get_ui_manager (editor);
        editor_widget = e_editor_get_editor_widget (editor);
 
@@ -450,7 +450,7 @@ e_composer_paste_html (EMsgComposer *composer,
        html = e_clipboard_wait_for_html (clipboard);
        g_return_val_if_fail (html != NULL, FALSE);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (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);
@@ -506,7 +506,7 @@ 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. */
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        if (e_editor_widget_get_html_mode (editor_widget)) {
                EEditorSelection *selection;
@@ -554,7 +554,7 @@ e_composer_paste_text (EMsgComposer *composer,
        text = gtk_clipboard_wait_for_text (clipboard);
        g_return_val_if_fail (text != NULL, FALSE);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (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);
@@ -1047,7 +1047,7 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
 insert:
        /* Remove the old signature and insert the new one. */
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        selection = e_editor_widget_get_selection (editor_widget);
 
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 3bd3f00..fba456b 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1267,7 +1267,7 @@ composer_build_message (EMsgComposer *composer,
                EEditor *editor;
                EEditorWidget *editor_widget;
 
-               editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+               editor = e_msg_composer_get_editor (composer);
                editor_widget = e_editor_get_editor_widget (editor);
                data = g_byte_array_new ();
                text = e_editor_widget_get_text_plain (editor_widget);
@@ -1342,7 +1342,7 @@ composer_build_message (EMsgComposer *composer,
 
                clear_current_images (composer);
 
-               editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+               editor = e_msg_composer_get_editor (composer);
                editor_widget = e_editor_get_editor_widget (editor);
                data = g_byte_array_new ();
                text = e_editor_widget_get_text_html (editor_widget);
@@ -1584,7 +1584,7 @@ set_editor_text (EMsgComposer *composer,
                e_editor_widget_set_text_html (editor_widget, text);
        }
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_text_html (editor_widget, body);
 
@@ -1603,7 +1603,7 @@ attachment_store_changed_cb (EMsgComposer *composer)
 
        /* Mark the editor as changed so it prompts about unsaved
         * changes on close. */
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -1703,7 +1703,7 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        /* Order is important here to ensure common use cases are
@@ -1838,7 +1838,7 @@ msg_composer_drag_data_received_cb (GtkWidget *widget,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        /* HTML mode has a few special cases for drops... */
@@ -1898,7 +1898,7 @@ msg_composer_notify_header_cb (EMsgComposer *composer)
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 }
@@ -2081,7 +2081,7 @@ msg_composer_constructed (GObject *object)
 
        e_composer_private_constructed (composer);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (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);
@@ -2263,7 +2263,6 @@ msg_composer_map (GtkWidget *widget)
        }
 
        /* Jump to the editor as a last resort. */
-       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));
 }
@@ -2278,7 +2277,7 @@ msg_composer_key_press_event (GtkWidget *widget,
        EEditorWidget *editor_widget;
 
        composer = E_MSG_COMPOSER (widget);
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        input_widget =
@@ -3091,7 +3090,7 @@ set_signature_gui (EMsgComposer *composer)
        table = e_msg_composer_get_header_table (composer);
        combo_box = e_composer_header_table_get_signature_combo_box (table);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        widget = e_editor_get_editor_widget (editor);
        document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (widget));
 
@@ -3224,7 +3223,6 @@ e_msg_composer_new_with_message (EShell *shell,
        priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
        editor = e_msg_composer_get_editor (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) {
@@ -3544,7 +3542,7 @@ 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);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       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), FALSE);
 
@@ -3637,7 +3635,7 @@ 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 = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, TRUE);
 
@@ -3674,7 +3672,7 @@ e_msg_composer_send (EMsgComposer *composer)
                return;
        }
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        context = g_slice_new0 (AsyncContext);
        context->activity = e_editor_new_activity (editor);
@@ -3736,7 +3734,7 @@ 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 = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, FALSE);
 
@@ -3769,7 +3767,7 @@ e_msg_composer_save_to_drafts (EMsgComposer *composer)
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        context = g_slice_new0 (AsyncContext);
        context->activity = e_editor_new_activity (editor);
@@ -3825,7 +3823,7 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer,
 
        async_context_free (context);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        e_editor_widget_set_changed (editor_widget, FALSE);
 }
@@ -3852,7 +3850,7 @@ e_msg_composer_save_to_outbox (EMsgComposer *composer)
        if (!proceed_with_save)
                return;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        context = g_slice_new0 (AsyncContext);
        context->activity = e_editor_new_activity (editor);
@@ -3925,7 +3923,7 @@ e_msg_composer_print (EMsgComposer *composer,
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        context = g_slice_new0 (AsyncContext);
        context->activity = e_editor_new_activity (editor);
@@ -4311,7 +4309,7 @@ e_msg_composer_set_body (EMsgComposer *composer,
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        table = e_msg_composer_get_header_table (composer);
 
@@ -4689,7 +4687,7 @@ e_msg_composer_get_message (EMsgComposer *composer,
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        simple = g_simple_async_result_new (
@@ -4829,7 +4827,7 @@ e_msg_composer_get_message_draft (EMsgComposer *composer,
 
        g_simple_async_result_set_check_cancellable (simple, cancellable);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        if (e_editor_widget_get_html_mode (editor_widget))
                flags |= COMPOSER_FLAG_HTML_CONTENT;
@@ -4968,7 +4966,7 @@ e_msg_composer_get_raw_message_text (EMsgComposer *composer)
 
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        array = g_byte_array_new ();
@@ -5015,7 +5013,7 @@ e_msg_composer_can_close (EMsgComposer *composer,
        gint response;
 
        widget = GTK_WIDGET (composer);
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        /* this means that there is an async operation running,
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 62fec3d..63067cf 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -461,9 +461,6 @@ composer_presend_check_unwanted_html (EMsgComposer *composer,
 
        table = e_msg_composer_get_header_table (composer);
        recipients = e_composer_header_table_get_destinations (table);
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
-       editor_widget = e_editor_get_editor_widget (editor);
-       html_mode = e_editor_widget_get_html_mode (editor_widget);
 
        send_html = g_settings_get_boolean (settings, "composer-send-html");
        confirm_html = g_settings_get_boolean (settings, "prompt-on-unwanted-html");
@@ -596,8 +593,7 @@ exit:
                EEditor *editor;
                EEditorWidget *editor_widget;
 
-               editor = e_editor_window_get_editor (
-                       E_EDITOR_WINDOW (async_context->composer));
+               editor = e_msg_composer_get_editor (async_context->composer);
                editor_widget = e_editor_get_editor_widget (editor);
                e_editor_widget_set_changed (editor_widget, TRUE);
 
@@ -639,7 +635,7 @@ composer_set_no_change (EMsgComposer *composer)
 
        g_return_if_fail (composer != NULL);
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        e_editor_widget_set_changed (editor_widget, FALSE);
@@ -751,8 +747,7 @@ composer_save_to_drafts_cleanup (GObject *source_object,
 
        async_context = (AsyncContext *) user_data;
 
-       editor = e_editor_window_get_editor (
-               E_EDITOR_WINDOW (async_context->composer));
+       editor = e_msg_composer_get_editor (async_context->composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        activity = async_context->activity;
@@ -843,8 +838,7 @@ composer_save_to_drafts_got_folder (GObject *source_object,
 
        activity = async_context->activity;
 
-       editor = e_editor_window_get_editor (
-               E_EDITOR_WINDOW (async_context->composer));
+       editor = e_msg_composer_get_editor (async_context->composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        drafts_folder = e_mail_session_uri_to_folder_finish (
diff --git a/modules/composer-autosave/e-composer-autosave.c b/modules/composer-autosave/e-composer-autosave.c
index ce39a4f..5f24205 100644
--- a/modules/composer-autosave/e-composer-autosave.c
+++ b/modules/composer-autosave/e-composer-autosave.c
@@ -131,7 +131,7 @@ composer_autosave_changed_cb (EComposerAutosave *autosave)
 
        extensible = e_extension_get_extensible (E_EXTENSION (autosave));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (extensible));
+       editor = e_msg_composer_get_editor (E_MSG_COMPOSER (extensible));
        editor_widget = e_editor_get_editor_widget (editor);
        autosave->changed = e_editor_widget_get_changed (editor_widget);
 
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 9204f5c..6669b53 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -489,13 +489,11 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
                        E_MAIL_SIGNATURE_EDITOR (window));
 
        /* This applies to both the composer and signature editor. */
-       if (E_IS_EDITOR_WINDOW (window)) {
-               EEditor *editor;
+       if (editor != NULL) {
                EEditorWidget *editor_widget;
                GSettings *settings;
                gboolean active = TRUE;
 
-               editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
                editor_widget = e_editor_get_editor_widget (editor);
 
                settings = g_settings_new ("org.gnome.evolution.mail");
diff --git a/modules/settings/Makefile.am b/modules/settings/Makefile.am
index ba680bf..c03253d 100644
--- a/modules/settings/Makefile.am
+++ b/modules/settings/Makefile.am
@@ -45,8 +45,6 @@ module_settings_la_SOURCES = \
        e-settings-message-list.h \
        e-settings-name-selector-entry.c \
        e-settings-name-selector-entry.h \
-       e-settings-photo-cache.c \
-       e-settings-photo-cache.h \
        e-settings-spell-checker.c \
        e-settings-spell-checker.h \
        e-settings-spell-entry.c \
diff --git a/modules/settings/evolution-module-settings.c b/modules/settings/evolution-module-settings.c
index 5f56198..88101b5 100644
--- a/modules/settings/evolution-module-settings.c
+++ b/modules/settings/evolution-module-settings.c
@@ -31,7 +31,6 @@
 #include "e-settings-meeting-time-selector.h"
 #include "e-settings-message-list.h"
 #include "e-settings-name-selector-entry.h"
-#include "e-settings-photo-cache.h"
 #include "e-settings-spell-checker.h"
 #include "e-settings-spell-entry.h"
 #include "e-settings-web-view.h"
@@ -60,7 +59,6 @@ e_module_load (GTypeModule *type_module)
        e_settings_meeting_time_selector_type_register (type_module);
        e_settings_message_list_type_register (type_module);
        e_settings_name_selector_entry_type_register (type_module);
-       e_settings_photo_cache_type_register (type_module);
        e_settings_spell_checker_type_register (type_module);
        e_settings_spell_entry_type_register (type_module);
        e_settings_web_view_type_register (type_module);
diff --git a/plugins/email-custom-header/email-custom-header.c 
b/plugins/email-custom-header/email-custom-header.c
index 0cf24b5..a27b3c5 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -503,7 +503,7 @@ action_email_custom_header_cb (GtkAction *action,
        EmailCustomHeaderWindow *new_email_custom_header_window = NULL;
        EEditor *editor;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        ui_manager = e_editor_get_ui_manager (editor);
        menuitem = gtk_ui_manager_get_widget (ui_manager, "/main-menu/insert-menu/insert-menu-top/Custom 
Header");
 
@@ -548,7 +548,7 @@ e_plugin_ui_init (GtkUIManager *ui_manager,
 {
        EEditor *editor;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_actions (
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 6199136..91cedae 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -157,7 +157,7 @@ enable_disable_composer (EMsgComposer *composer,
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       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), enable);
@@ -302,7 +302,7 @@ async_external_editor (EMsgComposer *composer)
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        /* prefix temp files with evo so .*vimrc can be setup to recognize them */
@@ -518,7 +518,7 @@ e_plugin_ui_init (GtkUIManager *manager,
        EEditor *editor;
        EEditorWidget *editor_widget;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
 
        /* Add actions to the "composer" action group. */
diff --git a/plugins/face/face.c b/plugins/face/face.c
index e466196..d3d3491 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -444,7 +444,7 @@ e_plugin_ui_init (GtkUIManager *ui_manager,
                g_free (face);
        }
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_toggle_actions (
@@ -467,7 +467,7 @@ face_handle_send (EPlugin *ep,
        EEditor *editor;
        GtkAction *action;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (target->composer));
+       editor = e_msg_composer_get_editor (target->composer);
        action = e_editor_get_action (editor, "face-plugin");
 
        g_return_if_fail (action != NULL);
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 1b00fa7..dc8fdd7 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -1334,7 +1334,7 @@ init_composer_actions (GtkUIManager *ui_manager,
 {
        EEditor *editor;
 
-       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor = e_msg_composer_get_editor (composer);
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_actions (


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