Add text for displaying empty event description

Signed-off-by: Jonathan van der Steege <jonathan@jonakeys.nl>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Jonathan van der Steege 2022-06-21 22:15:38 +02:00 committed by Lukas Fleischer
parent 77ffe5d627
commit 7b350ac58f
2 changed files with 8 additions and 2 deletions

View File

@ -307,6 +307,7 @@ struct conf {
};
#define EMPTY_DAY_DEFAULT "--"
#define EMPTY_EVENT_DESC_DEFAULT _("(empty description)")
/* Daemon-related configuration. */
struct dmon_conf {

View File

@ -198,11 +198,16 @@ static void day_add_item(int type, time_t start, time_t order, union aptev_ptr i
/* Get the message of an item. */
char *day_item_get_mesg(struct day_item *day)
{
switch (day->type) {
char *message;
switch (day->type)
{
case APPT:
return day->item.apt->mesg;
case EVNT:
return day->item.ev->mesg;
message = day->item.ev->mesg;
if (*message == '\0')
return EMPTY_EVENT_DESC_DEFAULT;
return message;
case RECUR_APPT:
return day->item.rapt->mesg;
case RECUR_EVNT: