diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-14 08:49:46 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-14 08:56:33 +0800 |
commit | 6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f (patch) | |
tree | 8ac6832a905017845b3095112b83bb14da112617 /plugins | |
parent | caed9460b2d518005abe34035d5b414ff07c0212 (diff) | |
download | gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.gz gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.bz2 gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.lz gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.xz gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.zst gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.zip |
Pass an EShell to EMsgComposer instances.
Reduce the composer's dependency on e_shell_get_default().
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mailing-list-actions/mailing-list-actions.c | 9 | ||||
-rw-r--r-- | plugins/templates/templates.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index ce60275db7..70520e1155 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -116,12 +116,17 @@ emla_list_action_do (CamelFolder *folder, gint t; EMsgComposer *composer; gint send_message_response; + EShellBackend *shell_backend; + EShell *shell; EAccount *account; GtkWindow *window; if (msg == NULL) return; + shell_backend = e_mail_reader_get_shell_backend (action_data->reader); + shell = e_shell_backend_get_shell (shell_backend); + window = e_mail_reader_get_window (action_data->reader); for (t = 0; t < G_N_ELEMENTS (emla_action_headers); t++) { @@ -172,7 +177,7 @@ emla_list_action_do (CamelFolder *folder, if (send_message_response == GTK_RESPONSE_YES) { /* directly send message */ - composer = e_msg_composer_new_from_url (url); + composer = e_msg_composer_new_from_url (shell, url); if ((account = mail_config_get_account_by_source_url (action_data->uri))) e_composer_header_table_set_account ( e_msg_composer_get_header_table (composer), @@ -180,7 +185,7 @@ emla_list_action_do (CamelFolder *folder, e_msg_composer_send (composer); } else if (send_message_response == GTK_RESPONSE_NO) { /* show composer */ - em_utils_compose_new_message_with_mailto (url, action_data->uri); + em_utils_compose_new_message_with_mailto (shell, url, action_data->uri); } goto exit; diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index 5bf3eb7e65..04ac8a5748 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -470,10 +470,14 @@ create_new_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *mes CamelMimeMessage *new, *template; struct _camel_header_raw *header; CamelStream *mem; + EShell *shell; g_return_if_fail (data != NULL); g_return_if_fail (message != NULL); + /* FIXME Pass this in somehow. */ + shell = e_shell_get_default (); + folder = e_mail_local_get_folder (E_MAIL_FOLDER_TEMPLATES); template = g_object_get_data (G_OBJECT (action), "template"); @@ -513,7 +517,7 @@ create_new_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *mes camel_mime_message_get_recipients (template, CAMEL_RECIPIENT_TYPE_BCC)); /* Create the composer */ - em_utils_edit_message (new, folder); + em_utils_edit_message (shell, new, folder); g_object_unref (new); } |