aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/migration.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-01-09 05:23:07 +0800
committerTor Lillqvist <tml@src.gnome.org>2006-01-09 05:23:07 +0800
commit6d155e1314be71dd275b61508976a55c42a2cf6e (patch)
tree296380b68b9afe2e51b3859e867b6ef386e82cc9 /calendar/gui/migration.c
parent70f840be3f65466c70c81af6d17d6e1ff4c7fa26 (diff)
downloadgsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar.gz
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar.bz2
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar.lz
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar.xz
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.tar.zst
gsoc2013-evolution-6d155e1314be71dd275b61508976a55c42a2cf6e.zip
Bypass most of this file on Win32, as there are no 1.x installations on
2006-01-08 Tor Lillqvist <tml@novell.com> * gui/migration.c: Bypass most of this file on Win32, as there are no 1.x installations on Win32 to migrate from. Use g_filename_to_uri() in a couple places instead of just prefixing file://. svn path=/trunk/; revision=31098
Diffstat (limited to 'calendar/gui/migration.c')
-rw-r--r--calendar/gui/migration.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index ba9196d530..a9ac9de2af 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -55,6 +55,12 @@
#include "e-cal-event.h"
#include "migration.h"
+#ifndef G_OS_WIN32
+
+/* No previous versions have been available on Win32, so don't
+ * bother with upgrade support from 1.x on Win32.
+ */
+
static e_gconf_map_t calendar_display_map[] = {
/* /Calendar/Display */
{ "Timezone", "calendar/display/timezone", E_GCONF_MAP_STRING },
@@ -377,6 +383,7 @@ migrate_ical_folder (char *old_path, ESourceGroup *dest_group, char *source_name
return retval;
}
+#endif /* !G_OS_WIN32 */
#define WEBCAL_BASE_URI "webcal://"
#define CONTACTS_BASE_URI "contacts://"
@@ -525,7 +532,7 @@ create_task_sources (TasksComponent *component,
base_uri = g_build_filename (tasks_component_peek_base_directory (component),
"tasks", "local", NULL);
- base_uri_proto = g_strconcat ("file://", base_uri, NULL);
+ base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
groups = e_source_list_peek_groups (source_list);
if (groups) {
@@ -594,6 +601,8 @@ create_task_sources (TasksComponent *component,
g_free (base_uri);
}
+#ifndef G_OS_WIN32
+
static void
migrate_pilot_db_key (const char *key, gpointer user_data)
{
@@ -711,6 +720,8 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
g_dir_close (dir);
}
+#endif
+
gboolean
migrate_calendars (CalendarComponent *component, int major, int minor, int revision, GError **err)
{
@@ -725,6 +736,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
groups/sources. */
create_calendar_sources (component, calendar_component_peek_source_list (component), &on_this_computer, &personal_source, &on_the_web, &contacts);
+#ifndef G_OS_WIN32
if (major == 1) {
xmlDocPtr config_doc = NULL;
char *conf_file;
@@ -849,6 +861,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
}
}
+#endif /* !G_OS_WIN32 */
e_source_list_sync (calendar_component_peek_source_list (component), NULL);
@@ -893,6 +906,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
groups/sources. */
create_task_sources (component, tasks_component_peek_source_list (component), &on_this_computer, &on_the_web, &personal_source);
+#ifndef G_OS_WIN32
if (major == 1) {
xmlDocPtr config_doc = NULL;
char *conf_file;
@@ -988,7 +1002,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
}
}
}
-
+#endif /* !G_OS_WIN32 */
e_source_list_sync (tasks_component_peek_source_list (component), NULL);
retval = TRUE;
fail:
@@ -1026,7 +1040,7 @@ create_memo_sources (MemosComponent *component,
base_uri = g_build_filename (memos_component_peek_base_directory (component),
"memos", "local", NULL);
- base_uri_proto = g_strconcat ("file://", base_uri, NULL);
+ base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
groups = e_source_list_peek_groups (source_list);
if (groups) {