- TW-1484 The 'history' and 'ghistory' reports do not obey rc.color.label.
This commit is contained in:
Paul Beckingham 2015-01-10 15:49:42 -05:00
parent cdde747733
commit 547d9edb55
14 changed files with 56 additions and 1 deletions

View file

@ -1,5 +1,6 @@
2.4.1 () -
- TW-1484 The 'history' and 'ghistory' reports do not obey rc.color.label.
- TW-1486 task wait shows completed tasks which has a wait attribute (thanks to
Sujeevan Vijayakumaran).
- TW-1492 compiling v2.4.0 using musl(libc) (thanks to V.Krishn).

View file

@ -979,6 +979,9 @@ void TDB2::show_diff (
view.add (Column::factory ("string", STRING_TDB2_UNDO_PRIOR));
view.add (Column::factory ("string", STRING_TDB2_UNDO_CURRENT));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
Task after (current);
if (prior != "")

View file

@ -284,6 +284,7 @@ int CmdCalendar::execute (std::string& output)
Color color_weekend (context.config.get ("color.calendar.weekend"));
Color color_holiday (context.config.get ("color.calendar.holiday"));
Color color_weeknumber (context.config.get ("color.calendar.weeknumber"));
Color color_label (context.config.get ("color.label"));
if (context.color () && context.config.getBoolean ("calendar.legend"))
out << "Legend: "
@ -363,6 +364,7 @@ int CmdCalendar::execute (std::string& output)
holTable.width (context.getWidth ());
holTable.add (Column::factory ("string", STRING_CMD_CAL_LABEL_DATE));
holTable.add (Column::factory ("string", STRING_CMD_CAL_LABEL_HOL));
holTable.colorHeader (color_label);
Config::const_iterator it;
std::map <time_t, std::vector<std::string> > hm; // we need to store multiple holidays per day
@ -426,7 +428,10 @@ std::string CmdCalendar::renderMonths (
throw std::string (STRING_CMD_CAL_SUN_MON);
// Build table for the number of months to be displayed.
Color label (context.config.get ("color.label"));
ViewText view;
view.colorHeader (label);
view.width (context.getWidth ());
for (int i = 0 ; i < (monthsPerLine * 8); i += 8)
{

View file

@ -70,6 +70,9 @@ int CmdColumns::execute (std::string& output)
formats.add (Column::factory ("string", STRING_COLUMN_LABEL_STYLES));
formats.add (Column::factory ("string", STRING_COLUMN_LABEL_EXAMPLES));
Color label (context.config.get ("color.label"));
formats.colorHeader (label);
Color alternate (context.config.get ("color.alternate"));
formats.colorOdd (alternate);
formats.intraColorOdd (alternate);

View file

@ -104,6 +104,9 @@ int CmdHistoryMonthly::execute (std::string& output)
view.add (Column::factory ("string.right", STRING_CMD_HISTORY_DEL));
view.add (Column::factory ("string.right", STRING_CMD_HISTORY_NET));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
int totalAdded = 0;
int totalCompleted = 0;
int totalDeleted = 0;
@ -257,6 +260,9 @@ int CmdHistoryAnnual::execute (std::string& output)
view.add (Column::factory ("string.right", STRING_CMD_HISTORY_DEL));
view.add (Column::factory ("string.right", STRING_CMD_HISTORY_NET));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
int totalAdded = 0;
int totalCompleted = 0;
int totalDeleted = 0;
@ -411,6 +417,9 @@ int CmdGHistoryMonthly::execute (std::string& output)
Color color_add (context.config.get ("color.history.add"));
Color color_done (context.config.get ("color.history.done"));
Color color_delete (context.config.get ("color.history.delete"));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
// Determine the longest line, and the longest "added" line.
int maxAddedLine = 0;
@ -603,6 +612,9 @@ int CmdGHistoryAnnual::execute (std::string& output)
Color color_add (context.config.get ("color.history.add"));
Color color_done (context.config.get ("color.history.done"));
Color color_delete (context.config.get ("color.history.delete"));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
// Determine the longest line, and the longest "added" line.
int maxAddedLine = 0;

View file

@ -106,6 +106,9 @@ int CmdInfo::execute (std::string& output)
Color alternate (context.config.get ("color.alternate"));
view.colorOdd (alternate);
view.intraColorOdd (alternate);
Color label (context.config.get ("color.label"));
view.colorHeader (label);
}
Date now;
@ -427,6 +430,9 @@ int CmdInfo::execute (std::string& output)
Color alternate (context.config.get ("color.alternate"));
journal.colorOdd (alternate);
journal.intraColorOdd (alternate);
Color label (context.config.get ("color.label"));
journal.colorHeader (label);
}
journal.width (context.getWidth ());

View file

@ -104,6 +104,9 @@ int CmdProjects::execute (std::string& output)
view.add (Column::factory ("string", STRING_COLUMN_LABEL_PROJECT));
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_TASKS));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
std::vector <std::string> processed;
std::map <std::string, int>::iterator project;
for (project = unique.begin (); project != unique.end (); ++project)

View file

@ -85,6 +85,9 @@ int CmdReports::execute (std::string& output)
view.add (Column::factory ("string", STRING_CMD_REPORTS_REPORT));
view.add (Column::factory ("string", STRING_CMD_REPORTS_DESC));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
// If an alternating row color is specified, notify the table.
if (context.color ())
{

View file

@ -260,6 +260,9 @@ int CmdShow::execute (std::string& output)
Color error (context.config.get ("color.error"));
Color warning (context.config.get ("color.warning"));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
bool issue_error = false;
bool issue_warning = false;

View file

@ -160,6 +160,9 @@ int CmdStats::execute (std::string& output)
view.add (Column::factory ("string", STRING_CMD_STATS_CATEGORY));
view.add (Column::factory ("string", STRING_CMD_STATS_DATA));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
int row = view.addRow ();
view.set (row, 0, STRING_COLUMN_LABEL_STAT_PE);
view.set (row, 1, pendingT);

View file

@ -127,7 +127,7 @@ int CmdSummary::execute (std::string& output)
Color bar_color (context.config.get ("color.summary.bar"));
Color bg_color (context.config.get ("color.summary.background"));
Color label (context.config.get ("color.label"));
Color label (context.config.get ("color.label"));
view.colorHeader (label);

View file

@ -96,6 +96,9 @@ int CmdTags::execute (std::string& output)
view.add (Column::factory ("string", STRING_COLUMN_LABEL_TAG));
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_COUNT));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
Color bold ("bold");
bool special = false;
std::map <std::string, int>::iterator i;

View file

@ -99,6 +99,9 @@ int CmdTimesheet::execute (std::string& output)
completed.add (Column::factory ("string.right", STRING_COLUMN_LABEL_DUE));
completed.add (Column::factory ("string", STRING_COLUMN_LABEL_DESC));
Color label (context.config.get ("color.label"));
completed.colorHeader (label);
std::vector <Task>::iterator task;
for (task = all.begin (); task != all.end (); ++task)
{
@ -155,6 +158,7 @@ int CmdTimesheet::execute (std::string& output)
started.add (Column::factory ("string", STRING_COLUMN_LABEL_PROJECT));
started.add (Column::factory ("string.right", STRING_COLUMN_LABEL_DUE));
started.add (Column::factory ("string", STRING_COLUMN_LABEL_DESC));
started.colorHeader (label);
for (task = all.begin (); task != all.end (); ++task)
{

View file

@ -87,6 +87,9 @@ int CmdUDAs::execute (std::string& output)
view.add (Column::factory ("string", STRING_COLUMN_LABEL_DEFAULT));
view.add (Column::factory ("string", STRING_COLUMN_LABEL_UDACOUNT));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
std::vector <std::string>::iterator uda;
for (uda = udas.begin (); uda != udas.end (); ++uda)
{
@ -147,6 +150,9 @@ int CmdUDAs::execute (std::string& output)
orphanView.add (Column::factory ("string", STRING_COLUMN_LABEL_ORPHAN));
orphanView.add (Column::factory ("string", STRING_COLUMN_LABEL_UDACOUNT));
Color label (context.config.get ("color.label"));
orphanView.colorHeader (label);
std::map <std::string, int>::iterator o;
for (o = orphans.begin (); o != orphans.end (); ++o)
{