diff --git a/ChangeLog b/ChangeLog index 9d96efa9f..f235d5f68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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). diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 207d66fa3..56104a9bc 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -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 != "") diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index d4220b61b..6b09d7a24 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -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 > 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) { diff --git a/src/commands/CmdColumns.cpp b/src/commands/CmdColumns.cpp index d721aed76..8ae79e045 100644 --- a/src/commands/CmdColumns.cpp +++ b/src/commands/CmdColumns.cpp @@ -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); diff --git a/src/commands/CmdHistory.cpp b/src/commands/CmdHistory.cpp index 0867499c5..4dce60375 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -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; diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index f72cbf1fb..7b8e98ee7 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -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 ()); diff --git a/src/commands/CmdProjects.cpp b/src/commands/CmdProjects.cpp index f81e7f678..048ca701b 100644 --- a/src/commands/CmdProjects.cpp +++ b/src/commands/CmdProjects.cpp @@ -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 processed; std::map ::iterator project; for (project = unique.begin (); project != unique.end (); ++project) diff --git a/src/commands/CmdReports.cpp b/src/commands/CmdReports.cpp index 70e9667fb..e55e474c3 100644 --- a/src/commands/CmdReports.cpp +++ b/src/commands/CmdReports.cpp @@ -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 ()) { diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 0a9bafae1..99b7fc71b 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -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; diff --git a/src/commands/CmdStats.cpp b/src/commands/CmdStats.cpp index eddd421c6..77bd56d3f 100644 --- a/src/commands/CmdStats.cpp +++ b/src/commands/CmdStats.cpp @@ -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); diff --git a/src/commands/CmdSummary.cpp b/src/commands/CmdSummary.cpp index 95d2338c3..d012fb0dd 100644 --- a/src/commands/CmdSummary.cpp +++ b/src/commands/CmdSummary.cpp @@ -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); diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index 54b078c65..da5d27c03 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -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 ::iterator i; diff --git a/src/commands/CmdTimesheet.cpp b/src/commands/CmdTimesheet.cpp index d007c1130..ef5047a2e 100644 --- a/src/commands/CmdTimesheet.cpp +++ b/src/commands/CmdTimesheet.cpp @@ -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 ::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) { diff --git a/src/commands/CmdUDAs.cpp b/src/commands/CmdUDAs.cpp index 9d9e145ca..a68b8a386 100644 --- a/src/commands/CmdUDAs.cpp +++ b/src/commands/CmdUDAs.cpp @@ -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 ::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 ::iterator o; for (o = orphans.begin (); o != orphans.end (); ++o) {