aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-10 22:54:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-11 00:19:18 +0800
commit6a791bb6e813ec5ec42b0d72eca775208b877e06 (patch)
tree493f5cbdbd259c1dbc802aecce21ddf1d7809922
parent5e5cdafb9578d18863bc5b980831412664c60289 (diff)
downloadgsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar.gz
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar.bz2
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar.lz
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar.xz
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.tar.zst
gsoc2013-evolution-6a791bb6e813ec5ec42b0d72eca775208b877e06.zip
e-convert-local-mail.c: Minor cleanups.
-rw-r--r--shell/e-convert-local-mail.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c
index c36a036749..02d7e094e4 100644
--- a/shell/e-convert-local-mail.c
+++ b/shell/e-convert-local-mail.c
@@ -150,7 +150,7 @@ migrate_stores (struct MigrateStore *ms)
}
static void
-rename_mail_dir (ESource *mbox_source,
+rename_mbox_dir (ESource *mbox_source,
const gchar *mail_data_dir)
{
gchar *old_mail_dir;
@@ -176,17 +176,15 @@ rename_mail_dir (ESource *mbox_source,
}
static gboolean
-migrate_mail_to_maildir (EShell *shell,
+migrate_mbox_to_maildir (EShell *shell,
CamelSession *session,
ESource *mbox_source)
{
ESourceRegistry *registry;
ESourceExtension *extension;
const gchar *extension_name;
- CamelService *mail_service;
+ CamelService *mbox_service;
CamelService *maildir_service;
- CamelStore *mail_store;
- CamelStore *maildir_store;
CamelSettings *settings;
const gchar *data_dir;
const gchar *mbox_uid;
@@ -219,7 +217,7 @@ migrate_mail_to_maildir (EShell *shell,
registry, mbox_source, NULL, &error);
if (error == NULL)
- mail_service = camel_session_add_service (
+ mbox_service = camel_session_add_service (
session, mbox_uid, "mbox",
CAMEL_PROVIDER_STORE, &error);
@@ -234,7 +232,7 @@ migrate_mail_to_maildir (EShell *shell,
return FALSE;
}
- camel_service_set_settings (mail_service, settings);
+ camel_service_set_settings (mbox_service, settings);
settings = camel_service_get_settings (maildir_service);
path = g_build_filename (data_dir, "local", NULL);
@@ -242,11 +240,8 @@ migrate_mail_to_maildir (EShell *shell,
g_mkdir (path, 0700);
g_free (path);
- mail_store = CAMEL_STORE (mail_service);
- maildir_store = CAMEL_STORE (maildir_service);
-
- ms.mail_store = mail_store;
- ms.maildir_store = maildir_store;
+ ms.mail_store = CAMEL_STORE (mbox_service);
+ ms.maildir_store = CAMEL_STORE (maildir_service);
ms.session = session;
ms.complete = FALSE;
@@ -287,7 +282,7 @@ e_convert_local_mail (EShell *shell)
mbox_source = e_source_new (NULL, NULL, NULL);
- rename_mail_dir (mbox_source, mail_data_dir);
+ rename_mbox_dir (mbox_source, mail_data_dir);
local_store = g_build_filename (mail_data_dir, "local", NULL);
@@ -303,7 +298,7 @@ e_convert_local_mail (EShell *shell)
"user-cache-dir", mail_cache_dir,
NULL);
- migrate_mail_to_maildir (shell, session, mbox_source);
+ migrate_mbox_to_maildir (shell, session, mbox_source);
g_object_unref (session);