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

@@ -193,12 +193,6 @@ struct date *ui_calendar_get_slctd_day(void)
return &slctd_day;
}
/* Returned value represents the selected day in calendar (in seconds) */
time_t ui_calendar_get_slctd_day_sec(void)
{
return date2sec(slctd_day, 0, 0);
}
static int ui_calendar_get_wday(struct date *date)
{
struct tm t;