mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdTags: Migrated to tagColor
This commit is contained in:
parent
259c78ce01
commit
b2b0c1d4e0
1 changed files with 4 additions and 9 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <cmake.h>
|
||||
#include <commands.h>
|
||||
#include <timew.h>
|
||||
#include <Table.h>
|
||||
#include <Color.h>
|
||||
#include <algorithm>
|
||||
|
@ -52,16 +53,10 @@ int CmdTags (Rules& rules, Database& database, Log& log)
|
|||
for (auto& tag : tags)
|
||||
{
|
||||
auto row = t.addRow ();
|
||||
t.set (row, 0, tag, tagColor (rules, tag));
|
||||
|
||||
Color c;
|
||||
std::string name = std::string ("tag.") + tag + ".color";
|
||||
if (rules.has (name))
|
||||
c = Color (rules.get (name));
|
||||
|
||||
t.set (row, 0, tag, c);
|
||||
|
||||
name = std::string ("tag.") + tag + ".description";
|
||||
t.set (row, 1, rules.get (name));
|
||||
auto name = std::string ("tag.") + tag + ".description";
|
||||
t.set (row, 1, rules.has (name) ? rules.get (name) : "-");
|
||||
}
|
||||
|
||||
std::cout << "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue