aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-01-10 04:19:03 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-10 04:19:03 +0800
commit183435c23ea48718fe8fe2a6e4f0f21e1f0dabbb (patch)
treeeb8a9aa865a60555438b1c8d874bcbb7432ef592 /calendar
parentde2cc7ef906f026d6b274556f462e71f29439619 (diff)
downloadgsoc2013-evolution-183435c23ea48718fe8fe2a6e4f0f21e1f0dabbb.tar.gz
gsoc2013-evolution-183435c23ea48718fe8fe2a6e4f0f21e1f0dabbb.tar.zst
gsoc2013-evolution-183435c23ea48718fe8fe2a6e4f0f21e1f0dabbb.zip
make sure we sync the source list when appropriate
2004-01-09 JP Rosevear <jpr@ximian.com> * gui/calendar-component.c (impl_upgradeFromVersion): make sure we sync the source list when appropriate * gui/tasks-component.c (impl_upgradeFromVersion): ditto svn path=/trunk/; revision=24137
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/calendar-component.c22
-rw-r--r--calendar/gui/tasks-component.c3
3 files changed, 30 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index ec2c9c6454..8984056033 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-09 JP Rosevear <jpr@ximian.com>
+
+ * gui/calendar-component.c (impl_upgradeFromVersion): make sure we
+ sync the source list when appropriate
+
+ * gui/tasks-component.c (impl_upgradeFromVersion): ditto
+
2004-01-09 ERDI Gergo <cactus@cactus.rulez.org>
* gui/calendar-component.c (impl_upgradeFromVersion): Create
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index ed3b389697..399a3558bf 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -239,7 +239,7 @@ update_primary_selection (CalendarComponent *calendar_component)
ESource *source;
/* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
+ source = e_source_list_peek_source_any (priv->source_list);
if (source)
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
}
@@ -522,6 +522,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
/* create the remote source group */
group = e_source_group_new (_("On The Web"), "webcal://");
e_source_list_add_group (priv->source_list, group, -1);
+ e_source_list_sync (priv->source_list, NULL);
}
if (major == 1 && minor <= 4) {
@@ -544,6 +545,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
}
g_free (new_dir);
}
+ e_source_list_sync (priv->source_list, NULL);
g_free (base_uri);
@@ -565,8 +567,24 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
e_source_group_add_source (group, source, -1);
e_source_group_set_readonly (group, TRUE);
e_source_list_add_group (priv->source_list, group, -1);
+ e_source_list_sync (priv->source_list, NULL);
}
+ /* create calendar for birthdays & anniversaries */
+ if ((major < 0) ||
+ ((major == 1) && (minor < 5)) ||
+ ((major == 1) && (minor == 5) && (revision < 2))) {
+ ESource *source;
+ char *base_uri, *new_dir;
+
+ group = e_source_group_new (_("Birthdays"), "contacts://");
+ source = e_source_new (_("Birthdays & Anniversaries"), "/");
+ e_source_group_add_source (group, source, -1);
+ e_source_group_set_readonly (group, TRUE);
+ e_source_list_add_group (priv->source_list, group, -1);
+ e_source_list_sync (priv->source_list, NULL);
+ }
+
return CORBA_TRUE;
}
@@ -742,7 +760,7 @@ setup_create_ecal (CalendarComponent *calendar_component)
if (!priv->create_ecal) {
/* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
+ source = e_source_list_peek_source_any (priv->source_list);
if (source)
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
}
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index fcd57d7fe2..dfb668ac7f 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -518,6 +518,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
/* create the source group */
group = e_source_group_new (_("On This Computer"), base_uri);
e_source_list_add_group (priv->source_list, group, -1);
+ e_source_list_sync (priv->source_list, NULL);
}
if (major == 1 && minor <= 4) {
@@ -534,6 +535,8 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
g_free (new_dir);
}
+
+ e_source_list_sync (priv->source_list, NULL);
}
g_free (base_uri);