From 9c0e4053c48dac3975ff11af731dd5f88021b381 Mon Sep 17 00:00:00 2001 From: Nicolas Appriou Date: Sat, 1 Feb 2014 11:12:44 +0100 Subject: [PATCH] bug #1508 configurable color output --- src/Config.cpp | 6 ++++-- src/commands/CmdShow.cpp | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index 2391df4b8..6b40af7bd 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -160,7 +160,8 @@ std::string Config::_defaults = #ifdef LINUX "color.header=color3 # Color of header messages\n" "color.footnote=color3 # Color of footnote messages\n" - "color.error=color3 # Color of error messages\n" + "color.warning=color3 # Color of warning messages\n" + "color.error=color1 # Color of error messages\n" "color.debug=color3 # Color of diagnostic output\n" "color.alternate=on color233 # Alternate color for line coloring\n" "\n" @@ -215,7 +216,8 @@ std::string Config::_defaults = #else "color.header=yellow # Color of header messages\n" "color.footnote=yellow # Color of footnote messages\n" - "color.error=yellow # Color of error messages\n" + "color.warning=yellow # Color of warning messages\n" + "color.error=red # Color of error messages\n" "color.debug=yellow # Color of diagnostic output\n" "color.alternate= # Alternate color for line coloring\n" "\n" diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index cd3f65e25..7b4d86e52 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -99,6 +99,7 @@ int CmdShow::execute (std::string& output) " color.deleted" " color.due" " color.due.today" + " color.warning" " color.error" " color.footnote" " color.header" @@ -257,8 +258,8 @@ int CmdShow::execute (std::string& output) view.add (Column::factory ("string", STRING_CMD_SHOW_CONF_VAR)); view.add (Column::factory ("string", STRING_CMD_SHOW_CONF_VALUE)); - Color error ("bold white on red"); - Color warning ("black on yellow"); + Color error (context.config.get ("color.error")); + Color warning (context.config.get ("color.warning")); bool issue_error = false; bool issue_warning = false;