color.due.today and color.calendar.due.today

- tasks due on the current day ("today") can now be colorized with
  their own color.
- this is for reports and the calendar
This commit is contained in:
Federico Hernandez 2010-02-12 00:21:52 +01:00
parent adb72ef023
commit 4adfec4482
8 changed files with 131 additions and 29 deletions

View file

@ -388,6 +388,9 @@ int getDueState (const std::string& due)
Date thisDay (rightNow.month (), rightNow.day (), rightNow.year ());
if (dt < thisDay)
return 3;
if (dt == thisDay)
return 2;
int imminentperiod = context.config.getInteger ("due");
@ -436,7 +439,7 @@ bool nag (Task& task)
{
if (t->id == task.id)
{
if (getDueState (t->get ("due")) == 2)
if (getDueState (t->get ("due")) == 3)
isOverdue = true;
std::string priority = t->get ("priority");
@ -445,7 +448,7 @@ bool nag (Task& task)
}
else if (t->getStatus () == Task::pending)
{
if (getDueState (t->get ("due")) == 2)
if (getDueState (t->get ("due")) == 3)
overdue++;
std::string priority = t->get ("priority");