mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Minor cleanup.
This commit is contained in:
parent
1b60c20bad
commit
f56e1bef54
3 changed files with 6 additions and 3 deletions
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ New Features in task 1.9
|
|||
- New columns that include the time as well as date
|
||||
- New attribute modifiers
|
||||
- Improved .taskrc validation
|
||||
- Improved calendar report with custom coloring and optional task details output
|
||||
|
||||
Please refer to the ChangeLog file for full details. There are too many to
|
||||
list here.
|
||||
|
|
|
@ -172,6 +172,7 @@ void Config::createDefaultRC (const std::string& rc, const std::string& data)
|
|||
<< "#color.recurring=on_red # Color of recur.any: tasks\n"
|
||||
<< "#color.header=bold_green # Color of header messages\n"
|
||||
<< "#color.footnote=bold_green # Color of footnote messages\n"
|
||||
<< "#color.alternate=on_rgb253 # Alternate color for line coloring\n"
|
||||
<< "color.calendar.today=black on cyan # Color of today in calendar\n"
|
||||
<< "color.calendar.due=black on green # Color of days with due tasks in calendar\n"
|
||||
<< "color.calendar.overdue=black on red # Color of days with overdue tasks in calendar\n"
|
||||
|
|
|
@ -416,15 +416,16 @@ int handleInfo (std::string &outs)
|
|||
table.addCell (row, 1, due);
|
||||
|
||||
overdue = (dt < now) ? true : false;
|
||||
Date nextweek = now + 7 * 86400;
|
||||
imminent = dt < nextweek ? true : false;
|
||||
int imminentperiod = context.config.get ("due", 7);
|
||||
Date imminentDay = now + imminentperiod * 86400;
|
||||
imminent = dt < imminentDay ? true : false;
|
||||
|
||||
if (context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false))
|
||||
{
|
||||
if (overdue)
|
||||
table.setCellColor (row, 1, Color (context.config.get ("color.overdue", "red")));
|
||||
else if (imminent)
|
||||
table.setCellColor (row, 1, Color (context.config.get ("color.due", "yellow")));
|
||||
table.setCellColor (row, 1, Color (context.config.get ("color.due", "green")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue