diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-23 05:07:52 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-27 20:58:50 +0800 |
commit | 6affbe33e90b4157380eff3dad6a9654c9a24443 (patch) | |
tree | b82de645ced44be6c6aa28a0b0759ba17afb1624 /mail/e-mail-backend.c | |
parent | eba9b45f9e0e2a7f1a8d2d79f14d9e5f3aded19e (diff) | |
download | gsoc2013-evolution-6affbe33e90b4157380eff3dad6a9654c9a24443.tar.gz gsoc2013-evolution-6affbe33e90b4157380eff3dad6a9654c9a24443.tar.zst gsoc2013-evolution-6affbe33e90b4157380eff3dad6a9654c9a24443.zip |
Migrate ~/.evolution to XDG base directories.
Migration runs just before the main loop starts.
It's just a sequence of local directory and file renames.
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r-- | mail/e-mail-backend.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index b2e22e397d..14a7d22ad3 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -368,6 +368,17 @@ mail_backend_folder_changed_cb (MailFolderCache *folder_cache, (EEventTarget *) target); } +static gboolean +mail_backend_idle_cb (EShellBackend *shell_backend) +{ + const gchar *data_dir; + + data_dir = e_shell_backend_get_data_dir (shell_backend); + e_mail_store_init (data_dir); + + return FALSE; +} + static void mail_backend_constructed (GObject *object) { @@ -422,8 +433,9 @@ mail_backend_constructed (GObject *object) mail_config_init (); mail_msg_init (); - data_dir = e_shell_backend_get_data_dir (shell_backend); - e_mail_store_init (data_dir); + /* Defer initializing CamelStores until after the main loop + * has started, so migration has a chance to run first. */ + g_idle_add ((GSourceFunc) mail_backend_idle_cb, shell_backend); } static void |