aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui-calendar.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-06-27 08:50:46 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-06-27 08:57:42 +0200
commit203ac0aa61cff1cd386bc0e1a74c234f8bf2681c (patch)
tree236bba4178f256f8d4910b4cfbdf1b57122d7602 /src/ui-calendar.c
parentb6f95b380f9662f9294b291c9a061750125bb7eb (diff)
downloadcalcurse-203ac0aa61cff1cd386bc0e1a74c234f8bf2681c.tar.gz
calcurse-203ac0aa61cff1cd386bc0e1a74c234f8bf2681c.zip
Highlight days with non-recurrent items
Use a different color for days with non-recurrent items in the calendar panel. This makes it possible to easily spot days that actually contain appointments. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/ui-calendar.c')
-rw-r--r--src/ui-calendar.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 4f61376..35c2a7e 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -471,12 +471,18 @@ draw_monthly_view(struct scrollwin *sw, struct date *current_day,
ofs_x + day_1_sav + 4 * c_day + 1, "%2d",
c_day);
custom_remove_attr(sw->inner, ATTR_HIGHEST);
- } else if (item_this_day) {
+ } else if (item_this_day == 1) {
custom_apply_attr(sw->inner, ATTR_LOW);
mvwprintw(sw->inner, ofs_y + 1,
ofs_x + day_1_sav + 4 * c_day + 1, "%2d",
c_day);
custom_remove_attr(sw->inner, ATTR_LOW);
+ } else if (item_this_day == 2) {
+ custom_apply_attr(sw->inner, ATTR_TRUE);
+ mvwprintw(sw->inner, ofs_y + 1,
+ ofs_x + day_1_sav + 4 * c_day + 1, "%2d",
+ c_day);
+ custom_remove_attr(sw->inner, ATTR_TRUE);
} else {
/* otherwise, print normal days in black */
mvwprintw(sw->inner, ofs_y + 1,
@@ -531,8 +537,10 @@ draw_weekly_view(struct scrollwin *sw, struct date *current_day,
attr = ATTR_LOWEST; /* today, but not selected */
else if (t.tm_mday == slctd_day.dd)
attr = ATTR_HIGHEST; /* selected day */
- else if (item_this_day)
+ else if (item_this_day == 1)
attr = ATTR_LOW;
+ else if (item_this_day == 2)
+ attr = ATTR_TRUE;
else
attr = 0;