aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2008-07-21 21:43:15 +0800
committerTor Lillqvist <tml@src.gnome.org>2008-07-21 21:43:15 +0800
commit9a1aca2034d6adee742b0859c1da373746972e06 (patch)
tree11667f49ec77db5f29f9710028998b51f1b90eca /mail
parentcdeb76956de51c305ad944cac0f7f2787894adb8 (diff)
downloadgsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar.gz
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar.bz2
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar.lz
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar.xz
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.tar.zst
gsoc2013-evolution-9a1aca2034d6adee742b0859c1da373746972e06.zip
Rearrange G_OS_WIN32 ifdefs a bit, as we need to compile more of this file
2008-07-21 Tor Lillqvist <tml@novell.com> * em-migrate.c: Rearrange G_OS_WIN32 ifdefs a bit, as we need to compile more of this file to support upgrade attempts from 2.12 and later. svn path=/trunk/; revision=35803
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/em-migrate.c26
2 files changed, 24 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7507e0af56..c8ef36b654 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-21 Tor Lillqvist <tml@novell.com>
+
+ * em-migrate.c: Rearrange G_OS_WIN32 ifdefs a bit, as we need
+ to compile more of this file to support upgrade attempts from 2.12
+ and later.
+
2008-07-21 Bharath Acharya <abharath@novell.com>
Fixed some compiler warnings for Templates specific hunk.
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 2ca4a990fb..ca5f9c9255 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -76,9 +76,10 @@
#define d(x) x
#ifndef G_OS_WIN32
-
-/* No previous versions have been available on Win32, so don't bother
- * with upgrade support from 1.x on Win32.
+/* No versions previous to 2.8 or thereabouts have been available on
+ * Windows, so don't bother with upgrade support from earlier versions
+ * on Win32. Do try to support upgrades from 2.12 and later to the
+ * current version.
*/
/* upgrade helper functions */
@@ -1191,6 +1192,8 @@ em_migrate_session_new (const char *path)
}
+#endif /* !G_OS_WIN32 */
+
static GtkWidget *window;
static GtkLabel *label;
static GtkProgressBar *progress;
@@ -1264,6 +1267,8 @@ em_migrate_set_progress (double percent)
gtk_main_iteration ();
}
+#ifndef G_OS_WIN32
+
static gboolean
is_mail_folder (const char *metadata)
{
@@ -1476,10 +1481,8 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode)
goto exception;
total += nwritten;
-#ifndef G_OS_WIN32
if (show_progress)
em_migrate_set_progress (((double) total) / ((double) st.st_size));
-#endif
} while (total < st.st_size);
if (fsync (writefd) == -1)
@@ -2673,7 +2676,7 @@ em_update_accounts_2_11 (void)
mail_config_save_accounts ();
}
-#endif
+#endif /* !G_OS_WIN32 */
static int
emm_setup_initial(const char *evolution_dir)
@@ -2968,8 +2971,8 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
if (major == 0)
return emm_setup_initial(evolution_dir);
-#ifndef G_OS_WIN32
if (major == 1 && minor < 5) {
+#ifndef G_OS_WIN32
xmlDocPtr config_xmldb = NULL, filters, vfolders;
path = g_build_filename (g_get_home_dir (), "evolution", NULL);
@@ -3025,12 +3028,20 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
}
g_free (path);
+#else
+ g_error ("Upgrading from ancient versions not supported on Windows");
+#endif
}
if (major < 2 || (major == 2 && minor < 12)) {
+#ifndef G_OS_WIN32
em_update_accounts_2_11 ();
+#else
+ g_error ("Upgrading from ancient versions not supported on Windows");
+#endif
}
+
if (major < 2 || (major == 2 && minor < 22))
em_update_message_notify_settings_2_21 ();
@@ -3039,6 +3050,5 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
migrate_to_db();
}
-#endif /* !G_OS_WIN32 */
return 0;
}