From 4b926012c0cae01569d71d178dc651d9e4b2c8e8 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 17 Apr 1998 23:22:50 +0000 Subject: The event dialog is beautified, recurrences are saner. 1998-04-17 Federico Mena Quintero * eventedit.c (ee_init_recurrence_page): New function that creates the recurrence page in the toplevel notebook. (ee_store_recur_values_to_ical): Now we can also store the recurrences. svn path=/trunk/; revision=151 --- calendar/pcs/calobj.c | 7 ++----- calendar/pcs/calobj.h | 5 ++++- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'calendar/pcs') 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 -- cgit v1.2.3