mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Recurrence
- Recurrence values are now stored in a parsed state, and rendered by Duration::formatCompact.
This commit is contained in:
parent
1714601ce4
commit
a3ba91c2a3
1 changed files with 7 additions and 2 deletions
|
@ -28,6 +28,7 @@
|
||||||
#define L10N // Localization complete.
|
#define L10N // Localization complete.
|
||||||
|
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
|
#include <Duration.h>
|
||||||
#include <ColRecur.h>
|
#include <ColRecur.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
@ -78,7 +79,7 @@ void ColumnRecur::measure (Task& task, int& minimum, int& maximum)
|
||||||
if (_style == "default" ||
|
if (_style == "default" ||
|
||||||
_style == "duration")
|
_style == "duration")
|
||||||
{
|
{
|
||||||
minimum = maximum = task.get ("recur").length ();
|
minimum = maximum = Duration (task.get ("recur")).formatCompact ().length ();
|
||||||
}
|
}
|
||||||
else if (_style == "indicator")
|
else if (_style == "indicator")
|
||||||
{
|
{
|
||||||
|
@ -99,7 +100,11 @@ void ColumnRecur::render (
|
||||||
if (_style == "default" ||
|
if (_style == "default" ||
|
||||||
_style == "duration")
|
_style == "duration")
|
||||||
{
|
{
|
||||||
lines.push_back (color.colorize (rightJustify (task.get ("recur"), width)));
|
lines.push_back (
|
||||||
|
color.colorize (
|
||||||
|
rightJustify (
|
||||||
|
Duration (task.get ("recur")).formatCompact (),
|
||||||
|
width)));
|
||||||
}
|
}
|
||||||
else if (_style == "indicator")
|
else if (_style == "indicator")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue