From 6784da1b28b5433943c3edc5520bb273b46f73b6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 19 May 2003 12:44:32 +0000 Subject: 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 --- mail/mail-callbacks.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'mail/mail-callbacks.c') 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); } -- cgit v1.2.3