aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-03-24 00:55:11 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-03-24 00:55:11 +0800
commit8b75e649855ed12734874ea46b2a81135c4ac626 (patch)
treed373e62a4f2a9cf1b00033e150cb4e3fd1860228 /calendar/gui
parentdc28866623f68d54c272a7474731cb3c5998d600 (diff)
downloadgsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar.gz
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar.bz2
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar.lz
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar.xz
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.tar.zst
gsoc2013-evolution-8b75e649855ed12734874ea46b2a81135c4ac626.zip
ensure that only one Personal calendar/task list gets created when moving
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 svn path=/trunk/; revision=25160
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/migration.c24
1 files changed, 15 insertions, 9 deletions
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;