diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-23 04:24:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-23 04:24:55 +0800 |
commit | 72684d4383144b482c5afb451b465e93c06f5963 (patch) | |
tree | 976f9dc4b45165ffd9ca8850aea076a8d32b6a2b /calendar/conduits | |
parent | c5ea7774a804a615079bb7b0d1cacebb4e2c0182 (diff) | |
download | gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar.gz gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar.bz2 gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar.lz gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar.xz gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.tar.zst gsoc2013-evolution-72684d4383144b482c5afb451b465e93c06f5963.zip |
Use e_cal_open_default() instead of e_cal_open(). (map_name): Changed the
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?).
svn path=/trunk/; revision=25586
Diffstat (limited to 'calendar/conduits')
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 28 |
1 files changed, 7 insertions, 21 deletions
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 */ |