aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2004-03-30 02:56:47 +0800
committerWilliam Jon McCann <mccann@src.gnome.org>2004-03-30 02:56:47 +0800
commitfc42513ceb7324d08ff725db90cbd1407d37d19b (patch)
treee6b1a2113ec25de43e8d4e74d6a6efaf93f67aaa
parentd2aaaeb274bc8d95dcbbb88c9c2af604e4c51b6b (diff)
downloadgsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar.gz
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar.bz2
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar.lz
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar.xz
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.tar.zst
gsoc2013-evolution-fc42513ceb7324d08ff725db90cbd1407d37d19b.zip
create On The Web source group for tasks.
2004-03-29 William Jon McCann <mccann@jhu.edu> * gui/migration.c (create_task_sources, migrate_tasks): create On The Web source group for tasks. svn path=/trunk/; revision=25230
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/migration.c17
2 files changed, 21 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6a1476d3f4..4ab12a5148 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-29 William Jon McCann <mccann@jhu.edu>
+
+ * gui/migration.c (create_task_sources, migrate_tasks): create
+ On The Web source group for tasks.
+
2004-03-29 Hari Prasad Nadig <hp@ndeepak.info>
* gui/goto-dialog.glade: Naming issue, Go to Date -> Select Date,
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index eecb0856b7..674773e0f3 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -463,6 +463,7 @@ static void
create_task_sources (TasksComponent *component,
ESourceList *source_list,
ESourceGroup **on_this_computer,
+ ESourceGroup **on_the_web,
ESource **personal_source)
{
GSList *groups;
@@ -470,6 +471,7 @@ create_task_sources (TasksComponent *component,
char *base_uri, *base_uri_proto;
*on_this_computer = NULL;
+ *on_the_web = NULL;
*personal_source = NULL;
base_uri = g_build_filename (tasks_component_peek_base_directory (component),
@@ -489,6 +491,8 @@ create_task_sources (TasksComponent *component,
if (!*on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group)))
*on_this_computer = g_object_ref (group);
+ else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI, e_source_group_peek_base_uri (group)))
+ *on_the_web = g_object_ref (group);
}
}
@@ -520,6 +524,14 @@ create_task_sources (TasksComponent *component,
*personal_source = source;
}
+ if (!*on_the_web) {
+ /* Create the Webcal source group */
+ group = e_source_group_new (_("On The Web"), WEBCAL_BASE_URI);
+ e_source_list_add_group (source_list, group, -1);
+
+ *on_the_web = group;
+ }
+
g_free (base_uri_proto);
g_free (base_uri);
}
@@ -642,13 +654,14 @@ gboolean
migrate_tasks (TasksComponent *component, int major, int minor, int revision)
{
ESourceGroup *on_this_computer = NULL;
+ ESourceGroup *on_the_web = NULL;
ESource *personal_source = NULL;
gboolean retval = TRUE;
/* we call this unconditionally now - create_groups either
creates the groups/sources or it finds the necessary
groups/sources. */
- create_task_sources (component, tasks_component_peek_source_list (component), &on_this_computer, &personal_source);
+ create_task_sources (component, tasks_component_peek_source_list (component), &on_this_computer, &on_the_web, &personal_source);
if (major == 1) {
xmlDocPtr config_doc = NULL;
@@ -717,6 +730,8 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision)
if (on_this_computer)
g_object_unref (on_this_computer);
+ if (on_the_web)
+ g_object_unref (on_the_web);
if (personal_source)
g_object_unref (personal_source);