aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-10 19:42:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-10 20:40:25 +0800
commitee5671fc1a5e442b677cf73a191c4d34bd99a93a (patch)
tree38c1962d267fdfb8bc988c7f12fa4b4f087da259 /shell/main.c
parent6f7c3dd230edb56ccaf957a58e531585ff03f38d (diff)
downloadgsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar.gz
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar.bz2
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar.lz
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar.xz
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.tar.zst
gsoc2013-evolution-ee5671fc1a5e442b677cf73a191c4d34bd99a93a.zip
Run mbox-to-Maildir conversion before loading modules.
Invoke the mbox-to-Maildir conversion directly from main(), just before the call to e_shell_load_modules(). The reason the code is here and not in the mail module is because we inform the user at startup of the impending mail conversion by displaying a popup dialog and waiting for confirmation. This has to be done before we load modules because some of the EShellBackends immediately add GMainContext sources that would otherwise get dispatched during gtk_dialog_run(), and we don't want then dispatched until after the conversion is complete.
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/shell/main.c b/shell/main.c
index d6de1499e4..a19614d76c 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -114,6 +114,9 @@ static gchar *geometry = NULL;
static gchar *requested_view = NULL;
static gchar **remaining_args;
+/* Forward declarations */
+void e_convert_local_mail (EShell *shell);
+
static void
categories_icon_theme_hack (void)
{
@@ -644,6 +647,18 @@ main (gint argc,
goto exit;
}
+ /* This routine converts the local mail store from mbox format to
+ * Maildir format as needed. The reason the code is here and not
+ * in the mail module is because we inform the user at startup of
+ * the impending mail conversion by displaying a popup dialog and
+ * waiting for confirmation before proceeding.
+ *
+ * This has to be done before we load modules because some of the
+ * EShellBackends immediately add GMainContext sources that would
+ * otherwise get dispatched during gtk_dialog_run(), and we don't
+ * want them dispatched until after the conversion is complete. */
+ e_convert_local_mail (shell);
+
e_shell_load_modules (shell);
if (!disable_eplugin) {