[evolution-patches] on the web tasks migration
- From: William Jon McCann <mccannwj pha jhu edu>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] on the web tasks migration
- Date: Wed, 24 Mar 2004 15:46:46 -0500
Hi,
Here is a patch that should add "On The Web" source group migration.
Please let me know if it looks ok.
Thanks,
Jon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2211
diff -p -u -r1.2211 ChangeLog
--- ChangeLog 24 Mar 2004 19:56:40 -0000 1.2211
+++ ChangeLog 24 Mar 2004 20:46:02 -0000
@@ -1,3 +1,8 @@
+2004-03-24 William Jon McCann <mccann jhu edu>
+
+ * gui/migration.c (create_task_sources, migrate_tasks): create
+ On The Web source group for tasks.
+
2004-03-24 Rodrigo Moya <rodrigo ximian com>
* gui/gnome-cal.c (update_query): don't create queries for the clients
Index: gui/migration.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/migration.c,v
retrieving revision 1.17
diff -p -u -r1.17 migration.c
--- gui/migration.c 23 Mar 2004 16:55:11 -0000 1.17
+++ gui/migration.c 24 Mar 2004 20:46:02 -0000
@@ -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 *com
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 *com
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 *com
*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
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]