summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2015-04-10 09:45:04 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2015-04-10 09:45:04 +0200
commit7fea5451ade0c7d534d3c9190b2152b836caae6e (patch)
tree06c34d72bf10c384e6c92fa82a4767c2e18684fa
parentebb811605632a1bfd75c1dadd2edf26950c6966c (diff)
downloadcalcurse-7fea5451ade0c7d534d3c9190b2152b836caae6e.tar.gz
calcurse-7fea5451ade0c7d534d3c9190b2152b836caae6e.zip
Show week numbers in the monthly view
Suggested-by: HÃ¥kan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r--src/ui-calendar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 6bc1b0f..7854048 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -394,6 +394,7 @@ draw_monthly_view(struct scrollwin *sw, struct date *current_day,
unsigned yr, mo;
int w, ofs_x, ofs_y;
int item_this_day = 0;
+ struct tm t = get_first_weekday(sunday_first);
mo = slctd_day.mm;
yr = slctd_day.yyyy;
@@ -416,6 +417,9 @@ draw_monthly_view(struct scrollwin *sw, struct date *current_day,
(int)((ymd_to_scalar(yr, mo, 1 + sunday_first) -
(long)1) % 7L);
+ /* Print the week number. */
+ draw_week_number(sw, t);
+
/* Write the current month and year on top of the calendar */
WINS_CALENDAR_LOCK;
if (yr * YEARINMONTHS + mo != monthly_view_cache_month) {