From ebe2afffe1e6e3afc6c367b2b3ea6675a7cec341 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 2 Jun 2004 21:13:53 +0000 Subject: remove absolute_uri from ESource's. (migrate_tasks): same. 2004-06-02 Chris Toshok * gui/migration.c (migrate_calendars): remove absolute_uri from ESource's. (migrate_tasks): same. svn path=/trunk/; revision=26159 --- calendar/ChangeLog | 6 ++++++ calendar/gui/migration.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 021a7b7db0..aad2578a20 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2004-06-02 Chris Toshok + + * gui/migration.c (migrate_calendars): remove absolute_uri from + ESource's. + (migrate_tasks): same. + 2004-06-02 Rodrigo Moya * gui/e-meeting-list-view.c (start_addressbook_server): removed 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); -- cgit