Re: [evolution-patches] support for webcal tasks
- From: JP Rosevear <jpr ximian com>
- To: mccann jhu edu
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] support for webcal tasks
- Date: Tue, 23 Mar 2004 22:32:39 -0500
On Tue, 2004-03-23 at 18:03, William Jon McCann wrote:
> Hi,
>
> This patch should add support for webcal tasks.
>
> Please let me know if this looks ok.
> Index: calendar/backends/http/e-cal-backend-http.c
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
> retrieving revision 1.14
> diff -p -u -r1.14 e-cal-backend-http.c
> --- calendar/backends/http/e-cal-backend-http.c 1 Mar 2004 15:45:56 -0000 1.14
> +++ calendar/backends/http/e-cal-backend-http.c 23 Mar 2004 22:59:17 -0000
> @@ -246,20 +246,25 @@ retrieval_done (SoupMessage *msg, ECalBa
> }
>
> /* Update cache */
> - subcomp = icalcomponent_get_first_component (icalcomp, ICAL_VEVENT_COMPONENT);
> + subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
> while (subcomp) {
> - ECalComponent *comp;
> + icalcomponent_kind kind = icalcomponent_isa (subcomp);
>
> - comp = e_cal_component_new ();
> - if (e_cal_component_set_icalcomponent (comp, subcomp)) {
> - e_cal_backend_cache_put_component (priv->cache, comp);
> - e_cal_backend_notify_object_created (E_CAL_BACKEND (cbhttp),
> - icalcomponent_as_ical_string (subcomp));
> - }
> + if (kind == ICAL_VEVENT_COMPONENT ||
> + kind == ICAL_VTODO_COMPONENT) {
> + ECalComponent *comp;
> +
Its probably better here to check against the kind of the backend (its
passed as a parameter during construction), that way if you have a file
containing a mixed backend, the right types are in the right backend.
-JP
--
JP Rosevear <jpr ximian com>
Ximian, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]