From 56ebfe2f3f1bbcd05c2ac78821edd06c986b40e6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 21 Oct 2011 13:26:07 -0400 Subject: Adapt to CamelNetworkSettings changes. --- mail/e-mail-local.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'mail/e-mail-local.c') diff --git a/mail/e-mail-local.c b/mail/e-mail-local.c index 1f33c08ab8..28d174e303 100644 --- a/mail/e-mail-local.c +++ b/mail/e-mail-local.c @@ -53,9 +53,9 @@ void e_mail_local_init (EMailSession *session, const gchar *data_dir) { + CamelSettings *settings; CamelService *service; - CamelURL *url; - gchar *temp; + gchar *path; gint ii; GError *error = NULL; @@ -67,19 +67,19 @@ e_mail_local_init (EMailSession *session, mail_local_initialized = TRUE; - url = camel_url_new ("maildir:", NULL); - temp = g_build_filename (data_dir, "local", NULL); - camel_url_set_path (url, temp); - g_free (temp); - - temp = camel_url_to_string (url, 0); service = camel_session_add_service ( - CAMEL_SESSION (session), "local", temp, + CAMEL_SESSION (session), + "local", "maildir", CAMEL_PROVIDER_STORE, &error); - g_free (temp); camel_service_set_display_name (service, _("On This Computer")); + settings = camel_service_get_settings (service); + + path = g_build_filename (data_dir, "local", NULL); + g_object_set (settings, "path", path, NULL); + g_free (path); + /* Shouldn't need to worry about other mail applications * altering files in our local mail store. */ g_object_set (service, "need-summary-check", FALSE, NULL); @@ -114,8 +114,6 @@ e_mail_local_init (EMailSession *session, } } - camel_url_free (url); - local_store = g_object_ref (service); return; @@ -126,7 +124,6 @@ fail: error->message); g_error_free (error); - camel_url_free (url); } CamelFolder * -- cgit