+ Fixed bug #783, which fixes completed and deleted tasks still showing as
  active (thanks to Adam Wolk).
This commit is contained in:
Paul Beckingham 2011-06-07 01:21:05 -04:00
parent 7c910e46be
commit 90f6f537fe
6 changed files with 21 additions and 29 deletions

View file

@ -132,12 +132,9 @@ static void colorizePriorityNone (Task& task, const std::string& rule, Color& c)
////////////////////////////////////////////////////////////////////////////////
static void colorizeActive (Task& task, const std::string& rule, Color& c)
{
Task::status status = task.getStatus ();
if (gsColor[rule].nontrivial () &&
status != Task::completed &&
status != Task::deleted &&
task.has ("start"))
task.has ("start") &&
!task.has ("end"))
c.blend (gsColor[rule]);
}
@ -157,7 +154,7 @@ static void colorizeProject (Task& task, const std::string& rule, Color& c)
std::string project = task.get ("project");
std::string rule_trunc = rule.substr (14);
// Match project names leftmost, just like Context::autoFilter.
// Match project names leftmost.
if (rule_trunc.length () <= project.length ())
if (compare (rule_trunc, project.substr (0, rule_trunc.length ()), sensitive))
c.blend (gsColor[rule]);