aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-05-19 20:44:32 +0800
committerDan Winship <danw@src.gnome.org>2003-05-19 20:44:32 +0800
commit6784da1b28b5433943c3edc5520bb273b46f73b6 (patch)
treef874bf3795a4063b71434feee2a5869d12b9164d /mail/mail-callbacks.c
parent5b0ded9bd44ac6001ed9a74773abc0c5cd0ab21c (diff)
downloadgsoc2013-evolution-6784da1b28b5433943c3edc5520bb273b46f73b6.tar.gz
gsoc2013-evolution-6784da1b28b5433943c3edc5520bb273b46f73b6.tar.zst
gsoc2013-evolution-6784da1b28b5433943c3edc5520bb273b46f73b6.zip
New async "empty trash" op.
* mail-ops.c (mail_empty_trash): New async "empty trash" op. * mail-callbacks.c (empty_trash): Use it rather than requiring that mail_tool_get_vtrash() work without blocking. #43091 svn path=/trunk/; revision=21243
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index dd6106331d..c8dd8a439b 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -3189,12 +3189,6 @@ stop_threads (BonoboUIComponent *uih, void *user_data, const char *path)
camel_operation_cancel (NULL);
}
-static void
-empty_trash_expunged_cb (CamelFolder *folder, void *data)
-{
- camel_object_unref (folder);
-}
-
void
empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
{
@@ -3226,11 +3220,7 @@ empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
/* make sure this store is a remote store */
if (provider->flags & CAMEL_PROVIDER_IS_STORAGE &&
provider->flags & CAMEL_PROVIDER_IS_REMOTE) {
- vtrash = mail_tool_get_trash (account->source->url, FALSE, &ex);
-
- if (vtrash) {
- mail_expunge_folder (vtrash, empty_trash_expunged_cb, NULL);
- }
+ mail_empty_trash (account, NULL, NULL);
}
}
@@ -3244,9 +3234,5 @@ empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
g_object_unref (iter);
/* Now empty the local trash folder */
- vtrash = mail_tool_get_trash ("file:/", TRUE, &ex);
- if (vtrash)
- mail_expunge_folder (vtrash, empty_trash_expunged_cb, NULL);
-
- camel_exception_clear (&ex);
+ mail_empty_trash (NULL, NULL, NULL);
}