aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 0b94bee562..8a6e3b116e 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -515,25 +515,33 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
{
CalendarComponentPrivate *priv;
GSList *groups;
+ ESourceGroup *group;
+ ESource *source;
+ char *base_uri, *new_dir;
CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
priv = calendar_component->priv;
+ base_uri = g_build_filename (g_get_home_dir (),
+ "/.evolution/calendar/local/OnThisComputer/",
+ NULL);
+
/* create default calendars if there are no groups */
groups = e_source_list_peek_groups (priv->source_list);
if (!groups) {
- ESourceGroup *group;
- ESource *source;
- char *base_uri, *new_dir;
-
/* create the local source group */
- base_uri = g_build_filename (g_get_home_dir (),
- "/.evolution/calendar/local/OnThisComputer/",
- NULL);
group = e_source_group_new (_("On This Computer"), base_uri);
e_source_list_add_group (priv->source_list, group, -1);
- /* migrate calendars from older setup */
+ /* create the remote source group */
+ group = e_source_group_new (_("On The Web"), "webcal://");
+ e_source_list_add_group (priv->source_list, group, -1);
+ }
+
+ if (major == 1 && minor <= 4) {
+ group = e_source_list_peek_group_by_name (priv->source_list, _("On This Computer"));
+
+ /* migrate calendars from 1.4 setup */
if (!migrate_old_calendars (group)) {
/* create default calendars */
new_dir = g_build_filename (base_uri, "Personal/", NULL);
@@ -550,13 +558,11 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
}
g_free (new_dir);
}
+ }
- /* create the remote source group */
- group = e_source_group_new (_("On The Web"), "webcal://");
- e_source_list_add_group (priv->source_list, group, -1);
+ g_free (base_uri);
- g_free (base_uri);
- }
+ return TRUE;
}
static void