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 /modules/addressbook/eab-composer-util.c | |
parent | caed9460b2d518005abe34035d5b414ff07c0212 (diff) | |
download | gsoc2013-evolution-6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f.tar.gz 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 'modules/addressbook/eab-composer-util.c')
-rw-r--r-- | modules/addressbook/eab-composer-util.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/addressbook/eab-composer-util.c b/modules/addressbook/eab-composer-util.c index 968a6b3c06..542e423d4d 100644 --- a/modules/addressbook/eab-composer-util.c +++ b/modules/addressbook/eab-composer-util.c @@ -28,7 +28,8 @@ #include "addressbook/gui/widgets/eab-gui-util.h" void -eab_send_as_to (GList *destinations) +eab_send_as_to (EShell *shell, + GList *destinations) { EMsgComposer *composer; EComposerHeaderTable *table; @@ -40,10 +41,12 @@ eab_send_as_to (GList *destinations) EDestination **destinations; } convert; + g_return_if_fail (E_IS_SHELL (shell)); + if (destinations == NULL) return; - composer = e_msg_composer_new (); + composer = e_msg_composer_new (shell); table = e_msg_composer_get_header_table (composer); to_array = g_ptr_array_new (); @@ -107,7 +110,8 @@ get_email (EContact *contact, EContactField field_id, gchar **to_free) } void -eab_send_as_attachment (GList *destinations) +eab_send_as_attachment (EShell *shell, + GList *destinations) { EMsgComposer *composer; EComposerHeaderTable *table; @@ -115,10 +119,12 @@ eab_send_as_attachment (GList *destinations) GList *contacts, *iter; gchar *data; + g_return_if_fail (E_IS_SHELL (shell)); + if (destinations == NULL) return; - composer = e_msg_composer_new (); + composer = e_msg_composer_new (shell); table = e_msg_composer_get_header_table (composer); attachment = camel_mime_part_new (); |