TW-1607: Theme Support for missing UDAs
- Thanks to Stefan Betz.
This commit is contained in:
@@ -78,6 +78,7 @@
|
|||||||
if a context is active (thanks to Johannes Schlatow).
|
if a context is active (thanks to Johannes Schlatow).
|
||||||
- TW-1600 Filtering "regressions"(?) in task-2.4.3, task-2.4.4 (thanks to Ralph
|
- TW-1600 Filtering "regressions"(?) in task-2.4.3, task-2.4.4 (thanks to Ralph
|
||||||
Bean).
|
Bean).
|
||||||
|
- TW-1607 Theme Support for missing UDAs (thanks to Stefan Betz).
|
||||||
- TW-1609 In 'urgency<10', 10 is interpreted as an ID (thanks to Wim Schuermann).
|
- TW-1609 In 'urgency<10', 10 is interpreted as an ID (thanks to Wim Schuermann).
|
||||||
- TW-1611 soww weirdness (thanks to Wim Schuermann).
|
- TW-1611 soww weirdness (thanks to Wim Schuermann).
|
||||||
- TW-1612 Spurious whitespace added in task descriptions around certain symbols
|
- TW-1612 Spurious whitespace added in task descriptions around certain symbols
|
||||||
|
|||||||
2
NEWS
2
NEWS
@@ -17,6 +17,8 @@ New configuration options in Taskwarrior 2.4.5
|
|||||||
- The 'json.depends.array' setting controls whether dependencies are exported
|
- The 'json.depends.array' setting controls whether dependencies are exported
|
||||||
as a JSON array, of a comma-separated string. Default is 'on'.
|
as a JSON array, of a comma-separated string. Default is 'on'.
|
||||||
Both variations are imported.
|
Both variations are imported.
|
||||||
|
- The 'color.uda.<name>.none' is a color that is applieѕ to tasks that do
|
||||||
|
not have a value for the UDA '<name>'.
|
||||||
|
|
||||||
Newly deprecated features in Taskwarrior 2.4.5
|
Newly deprecated features in Taskwarrior 2.4.5
|
||||||
|
|
||||||
|
|||||||
@@ -911,6 +911,11 @@ Colors any task that has the user defined attribute X.
|
|||||||
Colors any task that has the user defined attribute X set to VALUE.
|
Colors any task that has the user defined attribute X set to VALUE.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B color.uda.X.none=on green
|
||||||
|
Colors any task that does not have the user defined attribute X.
|
||||||
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B color.error=green
|
.B color.error=green
|
||||||
Colors any of the error messages.
|
Colors any of the error messages.
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ 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)
|
static void colorizeUDA (Task& task, const std::string& rule, const Color& base, Color& c)
|
||||||
{
|
{
|
||||||
// Is the rule uda.name.value or uda.name?
|
// Is the rule color.uda.name.value or color.uda.name?
|
||||||
size_t pos = rule.find (".", 10);
|
size_t pos = rule.find (".", 10);
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
{
|
{
|
||||||
@@ -208,7 +208,9 @@ static void colorizeUDA (Task& task, const std::string& rule, const Color& base,
|
|||||||
{
|
{
|
||||||
const std::string uda = rule.substr (10, pos - 10);
|
const std::string uda = rule.substr (10, pos - 10);
|
||||||
const std::string val = rule.substr (pos + 1);
|
const std::string val = rule.substr (pos + 1);
|
||||||
if (task.get (uda) == val)
|
if (val == "none" && ! task.has (uda))
|
||||||
|
c.blend (base);
|
||||||
|
else if (task.get (uda) == val)
|
||||||
c.blend (base);
|
c.blend (base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user