- The ghistory graph bars can now be colored with 'color.history.add',
  'color.history.done' and 'color.history.delete' configuration variables.
This commit is contained in:
Paul Beckingham 2010-07-03 12:51:36 -04:00
parent 356519e58f
commit 724e9b8113
5 changed files with 37 additions and 18 deletions

View file

@ -30,6 +30,8 @@
denotate command and the provided description (thanks to Dirk Deimeke). denotate command and the provided description (thanks to Dirk Deimeke).
+ Added support for more varied durations when specifying recurring tasks, + Added support for more varied durations when specifying recurring tasks,
such as '3 mths' or '24 hrs'. such as '3 mths' or '24 hrs'.
+ The ghistory graph bars can now be colored with 'color.history.add',
'color.history.done' and 'color.history.delete' configuration variables.
+ Fixed bug #406 so that task now includes command aliases in the _commands + Fixed bug #406 so that task now includes command aliases in the _commands
helper command used by shell completion scripts. helper command used by shell completion scripts.
+ Fixed bug #211 - it was unclear which commands modify a task description. + Fixed bug #211 - it was unclear which commands modify a task description.

View file

@ -615,6 +615,19 @@ useful when tasks are displayed over multiple lines due to long descriptions
or annotations. or annotations.
.RE .RE
.TP
.B color.history.add=on red
.RE
.br
.B color.history.done=on green
.RE
.br
.B color.history.delete=on yellow
.RS
Colors the bars on the ghistory report graphs. Defaults to red, green and
yellow bars.
.RE
.SS SHADOW FILE .SS SHADOW FILE
.TP .TP

View file

@ -106,6 +106,9 @@ std::string Config::defaults =
"color.calendar.weekend=bright white on black # Color of weekend days in calendar\n" "color.calendar.weekend=bright white on black # Color of weekend days in calendar\n"
"color.calendar.holiday=black on bright yellow # Color of public holidays in calendar\n" "color.calendar.holiday=black on bright yellow # Color of public holidays in calendar\n"
"color.calendar.weeknumber=black on white # Color of the weeknumbers in calendar\n" "color.calendar.weeknumber=black on white # Color of the weeknumbers in calendar\n"
"color.history.add=on red # Color of added tasks in ghistory report\n"
"color.history.done=on green # Color of completed tasks in ghistory report\n"
"color.history.delete=on yellow # Color of deleted tasks in ghistory report\n"
"#color.debug=magenta # Color of diagnostic output\n" "#color.debug=magenta # Color of diagnostic output\n"
"\n" "\n"
"# The following rules are presented in their order of precedence.\n" "# The following rules are presented in their order of precedence.\n"

View file

@ -659,6 +659,7 @@ int handleShow (std::string &outs)
"color.alternate color.calendar.today color.calendar.due color.calendar.due.today " "color.alternate color.calendar.today color.calendar.due color.calendar.due.today "
"color.calendar.overdue color.calendar.weekend color.calendar.holiday " "color.calendar.overdue color.calendar.weekend color.calendar.holiday "
"color.calendar.weeknumber color.summary.background color.summary.bar " "color.calendar.weeknumber color.summary.background color.summary.bar "
"color.history.add color.history.done color.history.delete "
"confirmation curses data.location dateformat dateformat.holiday " "confirmation curses data.location dateformat dateformat.holiday "
"dateformat.report dateformat.annotation debug default.command " "dateformat.report dateformat.annotation debug default.command "
"default.priority default.project defaultwidth due locale displayweeknumber " "default.priority default.project defaultwidth due locale displayweeknumber "

View file

@ -1266,9 +1266,9 @@ int handleReportGHistoryMonthly (std::string &outs)
else else
table.setTableDashedUnderline (); table.setTableDashedUnderline ();
Color color_added (Color::black, Color::red); Color color_add (context.config.get ("color.history.add"));
Color color_completed (Color::black, Color::green); Color color_done (context.config.get ("color.history.done"));
Color color_deleted (Color::black, Color::yellow); Color color_delete (context.config.get ("color.history.delete"));
// Determine the longest line, and the longest "added" line. // Determine the longest line, and the longest "added" line.
int maxAddedLine = 0; int maxAddedLine = 0;
@ -1350,9 +1350,9 @@ int handleReportGHistoryMonthly (std::string &outs)
while (bar.length () < leftOffset - aBar.length ()) while (bar.length () < leftOffset - aBar.length ())
bar += " "; bar += " ";
bar += color_added.colorize (aBar); bar += color_add.colorize (aBar);
bar += color_completed.colorize (cBar); bar += color_done.colorize (cBar);
bar += color_deleted.colorize (dBar); bar += color_delete.colorize (dBar);
} }
else else
{ {
@ -1379,11 +1379,11 @@ int handleReportGHistoryMonthly (std::string &outs)
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
out << "Legend: " out << "Legend: "
<< color_added.colorize ("added") << color_add.colorize ("added")
<< ", " << ", "
<< color_completed.colorize ("completed") << color_done.colorize ("completed")
<< ", " << ", "
<< color_deleted.colorize ("deleted") << color_delete.colorize ("deleted")
<< optionalBlankLine () << optionalBlankLine ()
<< std::endl; << std::endl;
else else
@ -1474,9 +1474,9 @@ int handleReportGHistoryAnnual (std::string &outs)
else else
table.setTableDashedUnderline (); table.setTableDashedUnderline ();
Color color_added (Color::black, Color::red); Color color_add (context.config.get ("color.history.add"));
Color color_completed (Color::black, Color::green); Color color_done (context.config.get ("color.history.done"));
Color color_deleted (Color::black, Color::yellow); Color color_delete (context.config.get ("color.history.delete"));
// Determine the longest line, and the longest "added" line. // Determine the longest line, and the longest "added" line.
int maxAddedLine = 0; int maxAddedLine = 0;
@ -1557,9 +1557,9 @@ int handleReportGHistoryAnnual (std::string &outs)
while (bar.length () < leftOffset - aBar.length ()) while (bar.length () < leftOffset - aBar.length ())
bar += " "; bar += " ";
bar += color_added.colorize (aBar); bar += color_add.colorize (aBar);
bar += color_completed.colorize (cBar); bar += color_done.colorize (cBar);
bar += color_deleted.colorize (dBar); bar += color_delete.colorize (dBar);
} }
else else
{ {
@ -1586,11 +1586,11 @@ int handleReportGHistoryAnnual (std::string &outs)
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
out << "Legend: " out << "Legend: "
<< color_added.colorize ("added") << color_add.colorize ("added")
<< ", " << ", "
<< color_completed.colorize ("completed") << color_done.colorize ("completed")
<< ", " << ", "
<< color_deleted.colorize ("deleted") << color_delete.colorize ("deleted")
<< optionalBlankLine () << optionalBlankLine ()
<< std::endl; << std::endl;
else else