mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Columns: Attribute objects properly delegate to Column::setStyle to validate formats
This commit is contained in:
parent
e871976bb9
commit
ebd6273c86
8 changed files with 8 additions and 8 deletions
|
@ -58,7 +58,7 @@ ColumnDepends::ColumnDepends ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnDepends::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "indicator" && _label == STRING_COLUMN_LABEL_DEP) _label = _label.substr (0, context.config.get ("dependency.indicator").length ());
|
||||
else if (_style == "count" && _label == STRING_COLUMN_LABEL_DEP) _label = STRING_COLUMN_LABEL_DEP_S;
|
||||
|
|
|
@ -41,7 +41,7 @@ ColumnEntry::ColumnEntry ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnEntry::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "age" &&
|
||||
_label == STRING_COLUMN_LABEL_ADDED)
|
||||
|
|
|
@ -50,7 +50,7 @@ ColumnRType::ColumnRType ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnRType::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "indicator" && _label == STRING_COLUMN_LABEL_RTYPE)
|
||||
_label = _label.substr (0, context.config.get ("rtype.indicator").length ());
|
||||
|
|
|
@ -57,7 +57,7 @@ ColumnRecur::ColumnRecur ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnRecur::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "indicator" && _label == STRING_COLUMN_LABEL_RECUR)
|
||||
_label = _label.substr (0, context.config.get ("recurrence.indicator").length ());
|
||||
|
|
|
@ -40,7 +40,7 @@ ColumnScheduled::ColumnScheduled ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnScheduled::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "countdown" && _label == STRING_COLUMN_LABEL_SCHED)
|
||||
_label = STRING_COLUMN_LABEL_COUNT;
|
||||
|
|
|
@ -47,7 +47,7 @@ ColumnStart::ColumnStart ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnStart::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "active" && _label == STRING_COLUMN_LABEL_STARTED)
|
||||
_label = STRING_COLUMN_LABEL_ACTIVE;
|
||||
|
|
|
@ -46,7 +46,7 @@ ColumnStatus::ColumnStatus ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnStatus::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "short" && _label == STRING_COLUMN_LABEL_STATUS)
|
||||
_label = STRING_COLUMN_LABEL_STAT;
|
||||
|
|
|
@ -59,7 +59,7 @@ ColumnTags::ColumnTags ()
|
|||
// Note that you can not determine which gets called first.
|
||||
void ColumnTags::setStyle (const std::string& value)
|
||||
{
|
||||
_style = value;
|
||||
Column::setStyle (value);
|
||||
|
||||
if (_style == "indicator" &&
|
||||
_label == STRING_COLUMN_LABEL_TAGS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue