aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/migration.c24
2 files changed, 21 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5667ae6dc0..60ccaf10e2 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-23 JP Rosevear <jpr@ximian.com>
+
+ * gui/migration.c (create_calendar_sources, create_task_sources):
+ ensure that only one Personal calendar/task list gets created when
+ moving between minor versions
+
2004-03-23 JP Rosevear <jpr@ximian.com>
* gui/dialogs/copy-source-dialog.c (copy_source): remove unused
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index a960e10e0a..979c4822af 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -382,9 +382,13 @@ create_calendar_sources (CalendarComponent *component,
{
GSList *groups;
ESourceGroup *group;
- ESource *source = NULL;
char *base_uri, *base_uri_proto;
-
+
+ *on_this_computer = NULL;
+ *on_the_web = NULL;
+ *contacts = NULL;
+ *personal_source = NULL;
+
base_uri = g_build_filename (calendar_component_peek_base_directory (component),
"/calendar/local/",
NULL);
@@ -429,9 +433,9 @@ create_calendar_sources (CalendarComponent *component,
*on_this_computer = group;
}
- if (!source) {
- /* Create the default Person addressbook */
- source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
+ if (!*personal_source) {
+ /* Create the default Person calendar */
+ ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (*on_this_computer, source, -1);
*personal_source = source;
@@ -463,8 +467,10 @@ create_task_sources (TasksComponent *component,
{
GSList *groups;
ESourceGroup *group;
- ESource *source = NULL;
char *base_uri, *base_uri_proto;
+
+ *on_this_computer = NULL;
+ *personal_source = NULL;
base_uri = g_build_filename (tasks_component_peek_base_directory (component),
"/tasks/local/",
@@ -506,9 +512,9 @@ create_task_sources (TasksComponent *component,
*on_this_computer = group;
}
- if (!source) {
- /* Create the default Person addressbook */
- source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
+ if (!*personal_source) {
+ /* Create the default Person task list */
+ ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (*on_this_computer, source, -1);
*personal_source = source;