From 36f98382e708d64e41d97be330b7c012f68cf9b6 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Sat, 8 Feb 2020 07:01:05 +0100 Subject: Treat recurrent events and appointments alike The day vector (or "day_items" vector) is used to load the appointments panel with "day_items" (captions, appointments, events). A multi-day appointment has several "day_items" in the day vector. This may also be the case for a recurring item. The day_item structure has a member "start", which for day_items for recurring appointments is set to the occurrence found by recur_item_find_occurrence(), and is used to tell days of a multi-day appointment apart. For day_items for recurring events it was set to "day" of the recur_event structure (the same value for all occurrences) and not used. The value is now the occurrence found by recur_event_find_occurrence(). The patch is backwards compatible and future-proof. Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- src/day.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/day.c b/src/day.c index 29184d9..2a1e1a8 100644 --- a/src/day.c +++ b/src/day.c @@ -360,7 +360,7 @@ static int day_store_recur_events(time_t date) p.rev = rev; time_t occurrence; if (recur_event_find_occurrence(rev, date, &occurrence)) { - day_add_item(RECUR_EVNT, rev->day, occurrence, p); + day_add_item(RECUR_EVNT, occurrence, occurrence, p); e_nb++; } } -- cgit v1.2.3-54-g00ecf