Simplify day storage

The function day_process_storage() is a wrapper for day_store_items().
It has an unused second argument, and is only used twice to load the
selected day. It has been removed.

A new function, get_slctd_day(), is the equivalant of get_today() and
replaces the very awkwardly named ui_calendar_get_slctd_day_sec().

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen
2018-12-13 20:29:22 +01:00
committed by Lukas Fleischer
parent 06a4449afa
commit 8dd694b569
6 changed files with 15 additions and 44 deletions

View File

@@ -672,6 +672,12 @@ time_t get_today(void)
return date2sec(day, 0, 0);
}
/* Returns the beginning of the selected day in the calendar. */
time_t get_slctd_day(void)
{
return date2sec(*ui_calendar_get_slctd_day(), 0, 0);
}
/* Returns the current time in seconds. */
time_t now(void)
{