aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-migrate.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-08 03:52:07 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:16 +0800
commitc5265294a3999b134e6f4d7d93b03001312cd075 (patch)
treecd230a50fe70324407d7e437e0b6918aa7968e70 /mail/e-mail-migrate.c
parent10a835d5e6e7a259d3ba68c43a13c28d619f8780 (diff)
downloadgsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar.gz
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar.bz2
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar.lz
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar.xz
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.tar.zst
gsoc2013-evolution-c5265294a3999b134e6f4d7d93b03001312cd075.zip
Avoid idle callbacks in EMailBackend initialization.
If the migration phase has to show a dialog the idle callback for intializing mail stores will run too soon. Instead, hook it onto the EShellBackend start() method. Migration code can initialize mail stores early if it needs to.
Diffstat (limited to 'mail/e-mail-migrate.c')
-rw-r--r--mail/e-mail-migrate.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 91a5e6fc43..ef12be0915 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -646,11 +646,14 @@ migrate_to_db (EShellBackend *shell_backend)
mail_backend = E_MAIL_BACKEND (shell_backend);
mail_session = e_mail_backend_get_session (mail_backend);
+ data_dir = e_shell_backend_get_data_dir (shell_backend);
+
+ /* Initialize the mail stores early so we can add a new one. */
+ e_mail_store_init (mail_session, data_dir);
iter = e_list_get_iterator ((EList *) accounts);
len = e_list_length ((EList *) accounts);
- data_dir = e_shell_backend_get_data_dir (shell_backend);
session = (EMMigrateSession *) em_migrate_session_new (data_dir);
camel_session_set_online ((CamelSession *) session, FALSE);
em_migrate_setup_progress_dialog (
@@ -965,10 +968,14 @@ create_mbox_account (EShellBackend *shell_backend, EMMigrateSession *session)
mail_backend = E_MAIL_BACKEND (shell_backend);
mail_session = e_mail_backend_get_session (mail_backend);
+ data_dir = e_shell_backend_get_data_dir (shell_backend);
+
+ /* Initialize the mail stores early so we can add a new one. */
+ e_mail_store_init (mail_session, data_dir);
+
account = e_account_new ();
account->enabled = TRUE;
- data_dir = e_shell_backend_get_data_dir (shell_backend);
url = camel_url_new ("mbox:", NULL);
temp = g_build_filename (data_dir, "local_mbox", NULL);
camel_url_set_path (url, temp);