- Added feature #340, which implements new color rules 'color.completed' and
  'color.deleted'.
This commit is contained in:
Paul Beckingham 2011-07-09 19:00:58 -04:00
parent 7986227ea2
commit 10b97fc967
6 changed files with 33 additions and 2 deletions

View file

@ -253,6 +253,20 @@ static void colorizeRecurring (Task& task, const std::string& rule, Color& c)
c.blend (gsColor[rule]);
}
////////////////////////////////////////////////////////////////////////////////
static void colorizeCompleted (Task& task, const std::string& rule, Color& c)
{
if (task.getStatus () == Task::completed)
c.blend (gsColor[rule]);
}
////////////////////////////////////////////////////////////////////////////////
static void colorizeDeleted (Task& task, const std::string& rule, Color& c)
{
if (task.getStatus () == Task::completed)
c.blend (gsColor[rule]);
}
////////////////////////////////////////////////////////////////////////////////
void autoColorize (Task& task, Color& c)
{
@ -283,6 +297,8 @@ void autoColorize (Task& task, Color& c)
else if (*r == "color.due.today") colorizeDueToday (task, *r, c);
else if (*r == "color.overdue") colorizeOverdue (task, *r, c);
else if (*r == "color.recurring") colorizeRecurring (task, *r, c);
else if (*r == "color.completed") colorizeCompleted (task, *r, c);
else if (*r == "color.deleted") colorizeDeleted (task, *r, c);
// Wildcards
else if (r->substr (0, 9) == "color.tag") colorizeTag (task, *r, c);