Re: [evolution-patches] Re: 4 x bugreport
- From: JP Rosevear <jpr ximian com>
- To: Info <info solnet cz>, Jan Becvar <jan becvar solnet cz>
- Cc: evolution-patches ximian com
- Subject: Re: [evolution-patches] Re: 4 x bugreport
- Date: Thu, 05 Feb 2004 10:46:28 -0500
On Thu, 2004-02-05 at 10:08, Jan Becvar wrote:
> >>--- 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);
> >>
> >>
> >
> >This part looks good.
> >
> >
> >
>
> And what about libical patch in first mail? :
>
> --- evolution.orig/libical/src/libical/icalrecur.c Thu Oct 30 09:14:09 2003
> +++ evolution/libical/src/libical/icalrecur.c Thu Oct 30 09:15:42 2003
> @@ -475,7 +475,7 @@
> return 0;
> }
>
> - str = (char*)icalmemory_tmp_buffer(buf_sz);
> + str = (char*)icalmemory_new_buffer(buf_sz);
> str_p = str;
>
> icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ=");
> @@ -545,6 +545,7 @@
> }
> }
>
> + icalmemory_add_tmp_buffer(str);
> return str;
> }
> #endif
>
>
>
> >>@@ -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)
> >>
> >>
> >
> >I think it instead of this hack, the single instance logic just below
> >needs a slight adjustment, maybe dtend_time >= start instead of
> >dtend_time > start.
> >
> >
>
> Maybe....but dtend_time >= start is wrong when DTEND > DTSTART and patch
> must work with recurrences....
Maybe i didn't explain well, i meant to say not do it your way, but
instead change:
if (!(cal_component_has_recurrences (comp)
|| cal_component_has_exceptions (comp))) {
if ((end == -1 || dtstart_time < end) && dtend_time > start) {
(* cb) (comp, dtstart_time, dtend_time, cb_data);
}
goto out;
}
to:
if (!(cal_component_has_recurrences (comp)
|| cal_component_has_exceptions (comp))) {
if ((end == -1 || dtstart_time < end) && dtend_time >= start) {
(* cb) (comp, dtstart_time, dtend_time, cb_data);
}
goto out;
}
-JP
--
JP Rosevear <jpr ximian com>
Ximian, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]