optionally count repeating wxLog messages instead of logging all (patch 1520815)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-07-25 00:04:35 +00:00
parent 0ca3c231fb
commit f98377912b
5 changed files with 112 additions and 11 deletions

View File

@@ -244,6 +244,12 @@ void wxLogGui::Flush()
// do it right now to block any new calls to Flush() while we're here
m_bHasMessages = false;
unsigned repeatCount = 0;
if ( wxLog::GetRepetitionCounting() )
{
repeatCount = wxLog::DoLogNumberOfRepeats();
}
wxString appName = wxTheApp->GetAppName();
if ( !appName.empty() )
appName[0u] = (wxChar)wxToupper(appName[0u]);
@@ -281,6 +287,8 @@ void wxLogGui::Flush()
{
#if wxUSE_LOG_DIALOG
if ( repeatCount > 0 )
m_aMessages[nMsgCount-1] += wxString::Format(wxT(" (%s)"), m_aMessages[nMsgCount-2].c_str());
wxLogDialog dlg(NULL,
m_aMessages, m_aSeverity, m_aTimes,
title, style);