Add configuration variables for multiple days
The number of days displayed in the APP panel has been made configurable, maximum 21 days, default seven days. With several days in the APP panel, it may be desirable to "squeeze" the entries by leaving out the final empty line of each appointment and lower the number of lines between consecutive days (0, 1, or 2). Both are made general configuration options. To make a uniform display, an empty line is added to a day without appointments, if appointments have an empty line. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
committed by
Lukas Fleischer
parent
0bb4a59b5f
commit
80ce812eff
@@ -42,7 +42,6 @@
|
||||
|
||||
#include "calcurse.h"
|
||||
|
||||
static unsigned day_days = 5;
|
||||
static vector_t day_items;
|
||||
static unsigned day_items_nb = 0;
|
||||
|
||||
@@ -109,7 +108,7 @@ int day_sel_index(void)
|
||||
|
||||
int day_get_days(void)
|
||||
{
|
||||
return day_days;
|
||||
return conf.multiple_days;
|
||||
}
|
||||
|
||||
static void day_free(struct day_item *day)
|
||||
@@ -462,8 +461,8 @@ day_store_items(time_t date, int include_captions, int n)
|
||||
}
|
||||
|
||||
if (include_captions) {
|
||||
/* Two empty lines between days. */
|
||||
if (apts == 0)
|
||||
/* Empty line at end of day if appointments have one. */
|
||||
if (apts == 0 && conf.empty_appt_line)
|
||||
day_add_item(EMPTY_SEPARATOR, 0, ENDOFDAY(date), p);
|
||||
day_add_item(DAY_SEPARATOR, 0, ENDOFDAY(date), p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user