aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-26 22:02:56 +0800
committerDan Winship <danw@src.gnome.org>2001-03-26 22:02:56 +0800
commit3eb45d09d2546975d001bfc295f9a105be5a9921 (patch)
treeef3f41c8a0a64db9fd2138b0bb0cee57ad83acb3 /mail/mail-callbacks.c
parentd3ce110bb79d7e5fc7966e8375d79201ac6ffbaf (diff)
downloadgsoc2013-evolution-3eb45d09d2546975d001bfc295f9a105be5a9921.tar.gz
gsoc2013-evolution-3eb45d09d2546975d001bfc295f9a105be5a9921.tar.zst
gsoc2013-evolution-3eb45d09d2546975d001bfc295f9a105be5a9921.zip
Simplify a bit using camel_session_get_provider.
* component-factory.c (mail_load_storages): Simplify a bit using camel_session_get_provider. * mail-callbacks.c (empty_trash): Ditto, and fix up use of CamelException. svn path=/trunk/; revision=8942
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 9ee434d16c..8d6a5aa57e 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1459,7 +1459,6 @@ empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
{
MailConfigAccount *account;
CamelProvider *provider;
- CamelService *service;
CamelFolder *vtrash;
const GSList *accounts;
CamelException *ex;
@@ -1473,30 +1472,22 @@ empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
/* make sure this is a valid source */
if (account->source && account->source->url) {
- service = camel_session_get_service (session, account->source->url,
- CAMEL_PROVIDER_STORE, ex);
-
- if (service) {
- provider = camel_service_get_provider (service);
-
+ provider = camel_session_get_provider (session, account->source->url, NULL);
+ if (provider) {
/* make sure this store is a remote store */
if (provider->flags & CAMEL_PROVIDER_IS_STORAGE &&
provider->flags & CAMEL_PROVIDER_IS_REMOTE) {
char *url;
url = g_strdup_printf ("vtrash:%s", account->source->url);
- vtrash = mail_tool_uri_to_folder (url, ex);
+ vtrash = mail_tool_uri_to_folder (url, NULL);
g_free (url);
if (vtrash)
mail_expunge_folder (vtrash, empty_trash_expunged_cb, NULL);
}
-
- camel_object_unref (CAMEL_OBJECT (service));
}
}
-
- camel_exception_clear (ex);
accounts = accounts->next;
}