path: root/src/calcurse.h
diff options
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-07-15 10:30:41 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2019-01-11 18:11:52 +0100
commit8cbd4566405dfac11d723df5c4bb85a679ef8dbf (patch)
tree16d79fe28313f0d28f045a4c8cf470b968604a7c /src/calcurse.h
parentf2ca5980e9ec27f94684088c153a218f08f8176e (diff)
Fix next recurring appointment
Recurring appointments do not show up in the notification bar as next appointment. This was partly corrected by 2084f35 (Fix notification of recurrent appointments, 2017-02-09) and 5aa7a09 (Fix another error in the notification code, 2017-02-11). The search function recur_apoint_starts_before() had a wrong second argument, but is really of no use: the start time of a recurring appointment is the start time of the very first occurrence (in the past). A comparison against the item in the notify_app structure tells nothing of the start time of the current day; at most it eliminates some future recurring appointments. The function can be dropped, and the entire recurring appointment list looked through. The proper start time is found in the main search loop (and called real_recur_start_time) and must be compared against the item in the notify_app structure. But because recur_apoint_find_occurrence() is limited to a particular day (second argument), two searches are necessary to cover 24 hours. Unrelated cleanups: removed function return value; changed long to time_t. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index a026896..4e92808 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -1049,8 +1049,7 @@ void recur_apoint_add_exc(struct recur_apoint *, long);
void recur_event_erase(struct recur_event *);
void recur_apoint_erase(struct recur_apoint *);
void recur_exc_scan(llist_t *, FILE *);
-struct notify_app *recur_apoint_check_next(struct notify_app *, long,
- long);
+void recur_apoint_check_next(struct notify_app *, time_t, time_t);
void recur_apoint_switch_notify(struct recur_apoint *);
void recur_event_paste_item(struct recur_event *, long);
void recur_apoint_paste_item(struct recur_apoint *, long);