Re: [evolution-patches] Fix for #56320 and related timezone issues
- From: Rodrigo Moya <rodrigo ximian com>
- To: kharish novell com
- Cc: patches <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] Fix for #56320 and related timezone issues
- Date: Tue, 18 May 2004 18:33:12 +0200
On Tue, 2004-05-18 at 20:20 +0530, Harish Krishnaswamy wrote:
> Changes added..
>
> -/* Add_timezone handler for the file backend */
> +/* Add_timezone handler for the groupwise backend */
> static ECalBackendSyncStatus
> e_cal_backend_groupwise_add_timezone (ECalBackendSync *backend,
> EDataCal *cal, const char *tzobj)
> {
> - return GNOME_Evolution_Calendar_OtherError;
> + icalcomponent *tz_comp;
> + ECalBackendGroupwise *cbgw;
> + ECalBackendGroupwisePrivate *priv;
> +
> + cbgw = (ECalBackendGroupwise *) backend;
> +
> + g_return_val_if_fail (E_IS_CAL_BACKEND_GROUPWISE (cbgw),
> GNOME_Evolution_Calendar_OtherError);
> + g_return_val_if_fail (tzobj != NULL,
> GNOME_Evolution_Calendar_OtherError);
> +
> + priv = cbgw->priv;
> +
> + tz_comp = icalparser_parse_string (tzobj);
> + if (!tz_comp)
> + return GNOME_Evolution_Calendar_InvalidObject;
> +
> + if (icalcomponent_isa (tz_comp) == ICAL_VTIMEZONE_COMPONENT) {
> + icaltimezone *zone;
> +
> + zone = icaltimezone_new ();
> + icaltimezone_set_component (zone, tz_comp);
> + if (!icalcomponent_get_timezone (priv->icalcomp,
> + icaltimezone_get_tzid
> (zone))) {
> + icalcomponent_add_component (priv->icalcomp,
> tz_comp);
> + }
> +
> + icaltimezone_free (zone, 1);
> + }
> +
> + return GNOME_Evolution_Calendar_Success;
> }
>
this does not add the timezone to the cache, but to the priv->icalcomp,
which is not used anywhere else. What do you need that priv->icalcomp
you added for?
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]