[evolution/wip/webkit-composer: 235/372] Prefer e_msg_composer_get_editor().



commit 3daf0513f071cc95a2e6e805b0e9539f95f10328
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 0c218a8..75a8d6a 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 7d74d8d..210373f 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -36,7 +36,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);
@@ -68,7 +68,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);
 
@@ -106,7 +106,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 a4eb2fe..2395109 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1229,7 +1229,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);
@@ -1301,7 +1301,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);
@@ -1531,7 +1531,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);
 
@@ -1551,7 +1551,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);
 }
@@ -1651,7 +1651,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
@@ -1761,7 +1761,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... */
@@ -1799,7 +1799,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);
 }
@@ -1982,7 +1982,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);
@@ -2129,6 +2129,7 @@ msg_composer_dispose (GObject *object)
 static void
 msg_composer_map (GtkWidget *widget)
 {
+       EMsgComposer *composer;
        EComposerHeaderTable *table;
        GtkWidget *input_widget;
        EEditor *editor;
@@ -2138,7 +2139,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 =
@@ -2161,7 +2164,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));
 }
@@ -2176,7 +2178,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 =
@@ -2958,7 +2960,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));
 
@@ -3088,8 +3090,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) {
@@ -3381,7 +3383,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);
 
@@ -3474,7 +3476,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);
 
@@ -3511,7 +3513,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);
@@ -3573,7 +3575,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);
 
@@ -3606,7 +3608,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);
@@ -3662,7 +3664,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);
 }
@@ -3689,7 +3691,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);
@@ -3762,7 +3764,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);
@@ -4148,7 +4150,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);
 
@@ -4526,7 +4528,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 (
@@ -4666,7 +4668,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;
@@ -4805,7 +4807,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 ();
@@ -4852,7 +4854,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 0917f40..6fb09e2 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -455,12 +455,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");
 
@@ -592,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);
 
@@ -635,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);
@@ -687,6 +687,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. */
@@ -742,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;
@@ -834,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 59ef621..a688452 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -441,19 +441,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 6b8fc12..5b04bf0 100644
--- a/modules/settings/Makefile.am
+++ b/modules/settings/Makefile.am
@@ -44,8 +44,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 d9d7a0f..7ff2d9f 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 d4f04ad..91070be 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 117844c..c5b97c3 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 b80149d..e042a96 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -1332,7 +1332,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]