diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/migration.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index fa449d5f17..0c9494b194 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -783,6 +783,26 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis g_free (new_path); g_free (old_path); } + + /* we only need to do this next step if people ran + older versions of 1.5. We need to clear out the + absolute URI's that were assigned to ESources + during one phase of development, as they take + precedent over relative uris (but aren't updated + when editing an ESource). */ + if (minor == 5 && revision <= 11) { + GSList *g; + for (g = e_source_list_peek_groups (calendar_component_peek_source_list (component)); g; g = g->next) { + ESourceGroup *group = g->data; + GSList *s; + + for (s = e_source_group_peek_sources (group); s; s = s->next) { + ESource *source = s->data; + e_source_set_absolute_uri (source, NULL); + } + } + } + } e_source_list_sync (calendar_component_peek_source_list (component), NULL); @@ -889,6 +909,25 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE g_free (new_path); g_free (old_path); } + + /* we only need to do this next step if people ran + older versions of 1.5. We need to clear out the + absolute URI's that were assigned to ESources + during one phase of development, as they take + precedent over relative uris (but aren't updated + when editing an ESource). */ + if (minor == 5 && revision <= 11) { + GSList *g; + for (g = e_source_list_peek_groups (tasks_component_peek_source_list (component)); g; g = g->next) { + ESourceGroup *group = g->data; + GSList *s; + + for (s = e_source_group_peek_sources (group); s; s = s->next) { + ESource *source = s->data; + e_source_set_absolute_uri (source, NULL); + } + } + } } e_source_list_sync (tasks_component_peek_source_list (component), NULL); |