summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-05-14 11:25:42 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2013-05-14 11:25:42 +0200
commite8e73e223b560b08b8ff6d0046b6726f2e92a5c5 (patch)
treed3cc92d457f8d570761a1139f62bb0e15f47ada2
parent9e86e258f2a34a94e63665dd31571bbfb124d0f9 (diff)
downloadcalcurse-e8e73e223b560b08b8ff6d0046b6726f2e92a5c5.zip
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 <calcurse@cryptocrack.de>
-rw-r--r--src/day.c5
1 files changed, 3 insertions, 2 deletions
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);
}