[evolution/webkit-composer: 169/231] Prefer e_msg_composer_get_editor().



commit 77aeb72ef9800d7e355f6823c8bae337865cea0b
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                          |   54 ++++++++++---------
 .../evolution-mail-composer-docs.sgml              |    1 -
 .../evolution-mail-composer-sections.txt           |   19 -------
 .../evolution-mail-composer.types                  |    2 -
 mail/em-composer-utils.c                           |   23 +++++----
 modules/composer-autosave/e-composer-autosave.c    |    2 +-
 modules/mail/e-mail-shell-backend.c                |   12 +++-
 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 +-
 15 files changed, 73 insertions(+), 88 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index c8def1c..4238db9 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -83,7 +83,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);
 }
@@ -95,7 +95,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);
 }
@@ -154,7 +154,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));
@@ -226,7 +226,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);
@@ -258,7 +258,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);
 }
@@ -270,7 +270,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);
 }
@@ -461,7 +461,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 d102f4c..65304d8 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -37,7 +37,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);
@@ -69,7 +69,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);
 
@@ -107,7 +107,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);
 
@@ -460,7 +460,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);
@@ -516,7 +516,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;
@@ -564,7 +564,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);
@@ -816,7 +816,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 8b5de06..5a3f23a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1221,7 +1221,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);
@@ -1293,7 +1293,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);
@@ -1523,7 +1523,7 @@ set_editor_text (EMsgComposer *composer,
                body = g_strdup_printf ("%s<BR>", 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);
 
@@ -1543,7 +1543,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);
 }
@@ -1632,7 +1632,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
@@ -1742,7 +1742,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... */
@@ -1780,7 +1780,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);
 }
@@ -1963,7 +1963,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);
@@ -2110,6 +2110,7 @@ msg_composer_dispose (GObject *object)
 static void
 msg_composer_map (GtkWidget *widget)
 {
+       EMsgComposer *composer;
        EComposerHeaderTable *table;
        GtkWidget *input_widget;
        EEditor *editor;
@@ -2119,7 +2120,9 @@ msg_composer_map (GtkWidget *widget)
        /* Chain up to parent's map() method. */
        GTK_WIDGET_CLASS (e_msg_composer_parent_class)->map (widget);
 
-       table = e_msg_composer_get_header_table (E_MSG_COMPOSER (widget));
+       composer = E_MSG_COMPOSER (widget);
+       editor = e_msg_composer_get_editor (composer);
+       table = e_msg_composer_get_header_table (composer);
 
        /* If the 'To' field is empty, focus it. */
        input_widget =
@@ -2142,7 +2145,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));
 }
@@ -2157,7 +2159,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 =
@@ -2927,7 +2929,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));
 
@@ -3057,8 +3059,8 @@ e_msg_composer_new_with_message (EShell *shell,
 
        composer = e_msg_composer_new (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) {
@@ -3355,7 +3357,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);
 
@@ -3448,7 +3450,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);
 
@@ -3485,7 +3487,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);
@@ -3547,7 +3549,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);
 
@@ -3580,7 +3582,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);
@@ -3636,7 +3638,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);
 }
@@ -3663,7 +3665,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);
@@ -3736,7 +3738,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);
@@ -4122,7 +4124,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);
 
@@ -4500,7 +4502,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 (
@@ -4639,7 +4641,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;
@@ -4752,7 +4754,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 ();
@@ -4799,7 +4801,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/doc/reference/evolution-mail-composer/evolution-mail-composer-docs.sgml 
b/doc/reference/evolution-mail-composer/evolution-mail-composer-docs.sgml
index becbfd6..b7d06b3 100644
--- a/doc/reference/evolution-mail-composer/evolution-mail-composer-docs.sgml
+++ b/doc/reference/evolution-mail-composer/evolution-mail-composer-docs.sgml
@@ -16,7 +16,6 @@
   <chapter>
     <title>Mail Composition</title>
     <xi:include href="xml/e-msg-composer.xml"/>
-    <xi:include href="xml/e-composer-activity.xml"/>
     <xi:include href="xml/e-composer-header-table.xml"/>
     <xi:include href="xml/e-composer-header.xml"/>
     <xi:include href="xml/e-composer-from-header.xml"/>
diff --git a/doc/reference/evolution-mail-composer/evolution-mail-composer-sections.txt 
b/doc/reference/evolution-mail-composer/evolution-mail-composer-sections.txt
index 4b286f9..cbe3f9e 100644
--- a/doc/reference/evolution-mail-composer/evolution-mail-composer-sections.txt
+++ b/doc/reference/evolution-mail-composer/evolution-mail-composer-sections.txt
@@ -1,23 +1,4 @@
 <SECTION>
-<FILE>e-composer-activity</FILE>
-<TITLE>EComposerActivity</TITLE>
-EComposerActivity
-e_composer_activity_new
-e_composer_activity_get_composer
-<SUBSECTION Standard>
-E_COMPOSER_ACTIVITY
-E_IS_COMPOSER_ACTIVITY
-E_TYPE_COMPOSER_ACTIVITY
-E_COMPOSER_ACTIVITY_CLASS
-E_IS_COMPOSER_ACTIVITY_CLASS
-E_COMPOSER_ACTIVITY_GET_CLASS
-EComposerActivityClass
-e_composer_activity_get_type
-<SUBSECTION Private>
-EComposerActivityPrivate
-</SECTION>
-
-<SECTION>
 <FILE>e-composer-from-header</FILE>
 <TITLE>EComposerFromHeader</TITLE>
 EComposerFromHeader
diff --git a/doc/reference/evolution-mail-composer/evolution-mail-composer.types 
b/doc/reference/evolution-mail-composer/evolution-mail-composer.types
index bf4ab7c..5e26731 100644
--- a/doc/reference/evolution-mail-composer/evolution-mail-composer.types
+++ b/doc/reference/evolution-mail-composer/evolution-mail-composer.types
@@ -1,4 +1,3 @@
-#include <composer/e-composer-activity.h>
 #include <composer/e-composer-from-header.h>
 #include <composer/e-composer-header-table.h>
 #include <composer/e-composer-header.h>
@@ -8,7 +7,6 @@
 #include <composer/e-composer-text-header.h>
 #include <composer/e-msg-composer.h>
 
-e_composer_activity_get_type
 e_composer_from_header_get_type
 e_composer_header_get_type
 e_composer_header_table_get_type
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 4a2f647..b68f330 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -462,12 +462,13 @@ composer_presend_check_unwanted_html (EMsgComposer *composer,
 
        settings = g_settings_new ("org.gnome.evolution.mail");
 
-       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 = e_msg_composer_get_editor (composer);
        editor_widget = e_editor_get_editor_widget (editor);
        html_mode = e_editor_widget_get_html_mode (editor_widget);
 
+       table = e_msg_composer_get_header_table (composer);
+       recipients = e_composer_header_table_get_destinations (table);
+
        send_html = g_settings_get_boolean (settings, "composer-send-html");
        confirm_html = g_settings_get_boolean (settings, "prompt-on-unwanted-html");
 
@@ -591,8 +592,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);
 
@@ -634,7 +634,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);
@@ -686,6 +686,11 @@ composer_save_to_drafts_complete (GObject *source_object,
        EEditorWidget *editor_widget;
        GError *local_error = NULL;
 
+       async_context = (AsyncContext *) user_data;
+
+       editor = e_msg_composer_get_editor (async_context->composer);
+       editor_widget = e_editor_get_editor_widget (editor);
+
        /* We don't really care if this failed.  If something other than
         * cancellation happened, emit a runtime warning so the error is
         * not completely lost. */
@@ -741,8 +746,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;
@@ -833,8 +837,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 033de5b..6f06e83 100644
--- a/modules/composer-autosave/e-composer-autosave.c
+++ b/modules/composer-autosave/e-composer-autosave.c
@@ -146,7 +146,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 df09f71..a1b725a 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -361,19 +361,25 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
        EShell *shell = E_SHELL (application);
        EMailBackend *backend;
        EMailSession *session;
+       EEditor *editor = NULL;
        const gchar *backend_name;
 
        backend = E_MAIL_BACKEND (shell_backend);
        session = e_mail_backend_get_session (backend);
 
+       if (E_IS_MSG_COMPOSER (window))
+               editor = e_msg_composer_get_editor (E_MSG_COMPOSER (window));
+
+       if (E_IS_MAIL_SIGNATURE_EDITOR (window))
+               editor = e_mail_signature_editor_get_editor (
+                       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 52c9042..0415b07 100644
--- a/modules/settings/Makefile.am
+++ b/modules/settings/Makefile.am
@@ -42,8 +42,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 a616f22..ac534bc 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"
@@ -59,7 +58,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 0c07592..ad4e2b8 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -501,7 +501,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");
 
@@ -546,7 +546,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 1f57332..664f96b 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -156,7 +156,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);
@@ -301,7 +301,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 */
@@ -514,7 +514,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 97a3b9f..63e1c4e 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -445,7 +445,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 (
@@ -468,7 +468,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 8a75cff..f659de6 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -1336,7 +1336,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]