diff options
Diffstat (limited to 'calendar/pcs')
-rw-r--r-- | calendar/pcs/calobj.c | 7 | ||||
-rw-r--r-- | calendar/pcs/calobj.h | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c index 2ff626c469..73406b9a5f 100644 --- a/calendar/pcs/calobj.c +++ b/calendar/pcs/calobj.c @@ -12,8 +12,6 @@ #include "timeutil.h" #include "versit/vcc.h" -static void ical_object_compute_end (iCalObject *ico); - iCalObject * ical_object_new (void) { @@ -1004,7 +1002,7 @@ duration_callback (iCalObject *ico, time_t start, time_t end, void *closure) int *count = closure; (*count)++; - if (ico->recur->duration == *count){ + if (ico->recur->duration == *count) { ico->recur->enddate = end; return 0; } @@ -1019,7 +1017,6 @@ ical_object_compute_end (iCalObject *ico) g_return_if_fail (ico->recur != NULL); + ico->recur->_enddate = 0; ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count); } - - diff --git a/calendar/pcs/calobj.h b/calendar/pcs/calobj.h index c499568bf7..48b3012695 100644 --- a/calendar/pcs/calobj.h +++ b/calendar/pcs/calobj.h @@ -176,7 +176,10 @@ void ical_object_destroy (iCalObject *ico); iCalObject *ical_object_create_from_vobject (VObject *obj, const char *object_name); VObject *ical_object_to_vobject (iCalObject *ical); void ical_foreach (GList *events, calendarfn fn, void *closure); -void ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendarfn cb, void *closure); +void ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendarfn cb, void *closure); + +/* Computes the enddate field of the recurrence based on the duration */ +void ical_object_compute_end (iCalObject *ico); END_GNOME_DECLS |