From e8e73e223b560b08b8ff6d0046b6726f2e92a5c5 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 14 May 2013 11:25:42 +0200 Subject: display_item_date(): Support punctual appointments Display appointments having the same starting date as ending date using a specific format that hides the end time ("12:00" instead of "12:00 -> 12:00"). Signed-off-by: Lukas Fleischer --- src/day.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/day.c') diff --git a/src/day.c b/src/day.c index 4691f01..9a99b95 100644 --- a/src/day.c +++ b/src/day.c @@ -416,8 +416,9 @@ display_item_date(struct day_item *day, int incolor, long date, int y, ch_recur = (day->type == RECUR_EVNT || day->type == RECUR_APPT) ? '*' : '-'; ch_notify = (day_item_get_state(day) & APOINT_NOTIFY) ? '!' : ' '; - mvwprintw(win, y, x, " %c%c%s -> %s", ch_recur, ch_notify, - a_st, a_end); + mvwprintw(win, y, x, " %c%c%s", ch_recur, ch_notify, a_st); + if (apt_tmp.dur) + mvwprintw(win, y, x + 3 + strlen(a_st), " -> %s", a_end); if (incolor == 0) custom_remove_attr(win, ATTR_HIGHEST); } -- cgit v1.2.3-54-g00ecf