From 74e77e4dc5e3483cfaf8fe5a67763eea14a94b3d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 3 Jun 2008 09:09:52 -0400 Subject: [PATCH] - Added legend to "task calendar" output --- ChangeLog | 1 + src/task.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ace45b8a6..519897925 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ + Bug: when run without arguments, task dumps core on Solaris 10 + "task calendar" now reports all months with due pending tasks + Added rules for colorization by tag, project and keyword + + Added legend to "task calendar" 0.9.9 (5/27/2008) + Autoconf/automake behaving properly. diff --git a/src/task.cpp b/src/task.cpp index c1e71753f..fbdeb0e67 100644 --- a/src/task.cpp +++ b/src/task.cpp @@ -1856,7 +1856,7 @@ std::string renderMonth ( due.year () == year) { table.setCellFg (row, dow + 1, Text::black); - table.setCellBg (row, dow + 1, d < today.day () ? Text::red : Text::yellow); + table.setCellBg (row, dow + 1, d < today.day () ? Text::on_red : Text::on_yellow); } } @@ -1915,6 +1915,16 @@ void handleReportCalendar (const TDB& tdb, T& task, Config& conf) ++yFrom; } } + + std::cout << "Legend: " + << Text::colorize (Text::cyan, Text::nocolor, "today") + << ", " + << Text::colorize (Text::black, Text::on_yellow, "due") + << ", " + << Text::colorize (Text::black, Text::on_red, "overdue") + << "." + << std::endl + << std::endl; } ////////////////////////////////////////////////////////////////////////////////