aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c28
2 files changed, 13 insertions, 21 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e8d1ab6625..fa51114d01 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2004-04-22 Jeffrey Stedfast <fejj@ximian.com>
+ * conduits/calendar/calendar-conduit.c (start_calendar_server):
+ Use e_cal_open_default() instead of e_cal_open().
+ (map_name): Changed the path for the pilot map filename.
+ (pre_sync): Changed the query to "#t" instead of "(#t)" and
+ removed a duplicate block of code (seems to have been a paste-o?).
+
* conduits/todo/todo-conduit.c (start_calendar_server): Use
e_cal_open_default() instead of e_cal_open().
(map_name): Changed the path for the pilot map filename.
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index c1c58e5968..e471d83944 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -389,22 +389,14 @@ static char *print_remote (GnomePilotRecord *remote)
static int
start_calendar_server (ECalConduitContext *ctxt)
{
- char *uri;
-
g_return_val_if_fail (ctxt != NULL, -2);
-
+
/* FIXME Need a mechanism for the user to select uri's */
/* FIXME Can we use the cal model? */
- uri = g_strdup_printf ("file://%s/local/Calendar/", g_get_home_dir ());
- ctxt->client = e_cal_new (uri, E_CAL_SOURCE_TYPE_EVENT);
- g_free (uri);
- if (!ctxt->client)
- return -1;
-
- if (!e_cal_open (ctxt->client, FALSE, NULL))
+ if (!e_cal_open_default (&ctxt->client, E_CAL_SOURCE_TYPE_EVENT, NULL, NULL, NULL))
return -1;
-
+
return 0;
}
@@ -451,8 +443,9 @@ map_name (ECalConduitContext *ctxt)
{
char *filename;
- filename = g_strdup_printf ("%s/evolution/local/Calendar/pilot-map-calendar-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
+ filename = g_strdup_printf ("%s/.evolution/calendar/local/system/pilot-map-calendar-%d.xml",
+ g_get_home_dir (), ctxt->cfg->pilot_id);
+
return filename;
}
@@ -1345,20 +1338,13 @@ pre_sync (GnomePilotConduit *conduit,
return -1;
}
- ctxt->default_comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
- g_object_unref (ctxt->default_comp);
- icalcomponent_free (icalcomp);
- return -1;
- }
-
/* Load the uid <--> pilot id mapping */
filename = map_name (ctxt);
e_pilot_map_read (filename, &ctxt->map);
g_free (filename);
/* Get the local database */
- if (!e_cal_get_object_list_as_comp (ctxt->client, "(#t)", &ctxt->comps, NULL))
+ if (!e_cal_get_object_list_as_comp (ctxt->client, "#t", &ctxt->comps, NULL))
return -1;
/* Find the added, modified and deleted items */