diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-18 10:20:50 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:51 +0800 |
commit | 34be64ac5286f0a3e4c02a74ff0ef8c4062bb966 (patch) | |
tree | 76da094f0c521074d799f0b8e6e4644a12609abb /mail/e-mail-backend.c | |
parent | 9b59286ea42a3db8b5d76f4e388b8691340b034c (diff) | |
download | gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar.gz gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar.bz2 gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar.lz gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar.xz gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.tar.zst gsoc2013-evolution-34be64ac5286f0a3e4c02a74ff0ef8c4062bb966.zip |
e_mail_store_foreach(): Take an EMailSession parameter.
Use camel_session_list_services() instead of the internal store table.
The store table serves little purpose nowadays and could probably be
removed. I'll look into that later.
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r-- | mail/e-mail-backend.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index 479b92ed59..647edf8257 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -140,7 +140,7 @@ mail_backend_prepare_for_offline_cb (EShell *shell, } e_mail_store_foreach ( - (GFunc) mail_store_prepare_for_offline_cb, activity); + session, (GFunc) mail_store_prepare_for_offline_cb, activity); } /* Helper for mail_backend_prepare_for_online_cb() */ @@ -166,7 +166,7 @@ mail_backend_prepare_for_online_cb (EShell *shell, camel_session_set_online (CAMEL_SESSION (session), TRUE); e_mail_store_foreach ( - (GFunc) mail_store_prepare_for_online_cb, activity); + session, (GFunc) mail_store_prepare_for_online_cb, activity); } /* Helper for mail_backend_prepare_for_quit_cb() */ @@ -241,6 +241,7 @@ mail_backend_prepare_for_quit_cb (EShell *shell, EMailBackend *backend) { EAccountList *account_list; + EMailSession *session; gboolean delete_junk; gboolean empty_trash; @@ -249,6 +250,8 @@ mail_backend_prepare_for_quit_cb (EShell *shell, gboolean empty_trash; } sync_data; + session = e_mail_backend_get_session (backend); + delete_junk = e_mail_backend_delete_junk_policy_decision (backend); empty_trash = e_mail_backend_empty_trash_policy_decision (backend); @@ -264,12 +267,13 @@ mail_backend_prepare_for_quit_cb (EShell *shell, if (delete_junk) e_mail_store_foreach ( - (GFunc) mail_backend_delete_junk, backend); + session, (GFunc) mail_backend_delete_junk, backend); sync_data.activity = activity; sync_data.empty_trash = empty_trash; - e_mail_store_foreach ((GFunc) mail_backend_final_sync, &sync_data); + e_mail_store_foreach ( + session, (GFunc) mail_backend_final_sync, &sync_data); /* Now we poll until all activities are actually cancelled or finished. * Reffing the activity delays quitting; the reference count |