- Added Feature #1099, which supports the 'color.uda.<uda-name>' color rule
  (thanks to Florian Hollerweger).
This commit is contained in:
Paul Beckingham 2012-12-01 13:29:23 -05:00
parent 7710c7a623
commit d8579730f5
8 changed files with 84 additions and 2 deletions

View file

@ -211,6 +211,13 @@ static void colorizeKeyword (Task& task, const std::string& rule, const Color& b
}
}
////////////////////////////////////////////////////////////////////////////////
static void colorizeUDA (Task& task, const std::string& rule, const Color& base, Color& c)
{
if (task.has (rule.substr (10)))
c.blend (base);
}
////////////////////////////////////////////////////////////////////////////////
static void colorizeDue (Task& task, const Color& base, Color& c)
{
@ -313,6 +320,7 @@ void autoColorize (Task& task, Color& c)
else if (r->substr (0, 10) == "color.tag.") colorizeTag (task, *r, base, c);
else if (r->substr (0, 14) == "color.project.") colorizeProject (task, *r, base, c);
else if (r->substr (0, 14) == "color.keyword.") colorizeKeyword (task, *r, base, c);
else if (r->substr (0, 10) == "color.uda.") colorizeUDA (task, *r, base, c);
}
}
}