Feature - color rules for partial project names

- The color.project.foo colorization rules now matches on partial
  project names (like foobar), matching the functionality of filters.
This commit is contained in:
Paul Beckingham 2009-12-27 13:46:55 -05:00
parent 167b9aa8eb
commit 79113668cd
2 changed files with 5 additions and 2 deletions

View file

@ -24,6 +24,8 @@
+ Added feature #307 that provides vim with syntax highlighting for .taskrc.
+ Task now support .taskrc command line overrides using rc.name:value and
the new rc.name=value to accommodate a frequent mistake.
+ The color rules for projects (color.project.foo) now matches on partial
project names, the same way as filters.
+ Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
was run, and there are no tasks with due dates.
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted

View file

@ -109,8 +109,9 @@ void autoColorize (Task& task, Color& c)
{
if (it->first.substr (0, 14) == "color.project.")
{
std::string value = it->first.substr (14);
if (task.get ("project") == value)
std::string value = lowerCase (it->first.substr (14));
std::string project = lowerCase (task.get ("project"));
if (project.find (value) == 0)
c.blend (it->second);
}
}