mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
adb72ef023
commit
4adfec4482
8 changed files with 131 additions and 29 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue