From 157db6351cfaf4ff23e71adb3bb1daedaf07b75d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 28 Nov 2017 13:13:44 -0500 Subject: [PATCH] Minor HTML message panel improvements. Change action message color from "darkgreen" to "dark green" as the former does not exist on windows and results in debug log warnings. Change the information color from "grey" to "dark grey" for improved contrast with the white backgrounds. This may need to configurable on systems where the HTML window has a dark background color. Don't translate HTML formatting strings. --- common/dialogs/wx_html_report_panel.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/common/dialogs/wx_html_report_panel.cpp b/common/dialogs/wx_html_report_panel.cpp index c00083e2d5..0a057c4c8b 100644 --- a/common/dialogs/wx_html_report_panel.cpp +++ b/common/dialogs/wx_html_report_panel.cpp @@ -128,22 +128,33 @@ wxString WX_HTML_REPORT_PANEL::addHeader( const wxString& aBody ) wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine ) { + wxString retv; + if( !m_showAll && ! ( m_severities & aLine.severity ) ) - return wxEmptyString; + return retv; switch( aLine.severity ) { case REPORTER::RPT_ERROR: - return wxString( "" ) + _( "Error: " ) + aLine.message + wxString( "
" ); + retv = "" + _( "Error: " ) + "" + + aLine.message + "
"; + break; case REPORTER::RPT_WARNING: - return wxString( "" ) + _( "Warning: " ) + aLine.message + wxString( "
" ); + retv = "" + _( "Warning: " ) + + "" + aLine.message + "
"; + break; case REPORTER::RPT_INFO: - return wxString( "" ) + _( "Info: " ) + aLine.message + wxString( "
" ); + retv = "" + _( "Info: " ) + "" + aLine.message + + "
"; + break; case REPORTER::RPT_ACTION: - return wxString( "" ) + aLine.message + wxString( "
" ); + retv = "" + aLine.message + "
"; + break; default: - return wxString( "" ) + aLine.message + wxString( "
" ); + retv = "" + aLine.message + "
"; } + + return retv; } @@ -246,7 +257,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event ) fn = dlg.GetPath(); if( fn.GetExt().IsEmpty() ) - fn.SetExt( wxT( "txt" ) ); + fn.SetExt( "txt" ); wxFile f( fn.GetFullPath(), wxFile::write );