Re: [evolution-patches] Re: 4 x bugreport



On Wed, 2004-01-28 at 12:55 +0100, Jan Becvar wrote:

> V St, 28. 01. 2004 v 11:16, Jan Becvar píše:
> > In the case that EVENT has neither DTEND nor RRULES and DTSTART is TIME
> > value (not DATE value) then cal_recur_generate_instances (comp, -1, -1,
> > ...) returns empty result. But cal_recur_generate_instances (comp, 0,
> > -1, ...) returns correct result (instance_start=DTSTART,
> > instance_end=DTSTART).
> > ====================================
> > In the case that EVENT has DTSTART same as DTEND (both are TIME values)
> > then cal_recur_generate_instances (comp, DTSTART, ...) returns empty
> > result. But cal_recur_generate_instances (comp, DTSTART - 1, ...)
> > returns correct result (instance_start=DTSTART, instance_end=DTEND). You
> > can see this bug in Evolution, when you add EVENT width DSTART=0:0 and
> > DTEND=0:0.
> 
> Oops, my previous patches don't work with RRULES (EVENT with
> DTSTARTtime=0:0, DTENDtime=0:0 and RRULE=daily, will not be shown in
> Evolution). This is correct patch for all three bugs:
>  
> --- evolution.orig/calendar/cal-util/cal-recur.c  2003-03-05 15:48:49.000000000 +0100
> +++ evolution/calendar/cal-util/cal-recur.c     2004-01-28 10:16:28.000000000 +0100
> @@ -725,6 +725,7 @@
>  		   If DTSTART is a DATE value we add 1 day. */
>  		dtend.value = g_new (struct icaltimetype, 1);
>  		*dtend.value = *dtstart.value;
> +                dtend.tzid = g_strdup (dtstart.tzid);
>  
>  		if (dtstart.value->is_date) {
>  			icaltime_adjust (dtend.value, 1, 0, 0, 0);
> @@ -751,6 +752,10 @@
>  #endif
>  	dtend_time = icaltime_as_timet_with_zone (*dtend.value, end_zone);
>  
> +        /* We must decrease `start' when DTSTART == DTEND */
> +        if (dtstart_time == dtend_time)
> +            start--;
> +
>  	/* If there is no recurrence, just call the callback if the event
>  	   intersects the given interval. */
>  	if (!(cal_component_has_recurrences (comp)
> 
> 
could you please resend your patch attached to the mail (instead of
right inside the mail) and with a ChangeLog entry?

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]