// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxChar *format, time_t t)
{
+#if wxUSE_DATETIME
wxChar buf[4096];
- if ( !wxStrftime(buf, WXSIZEOF(buf), format, localtime(&t)) )
+ struct tm tm;
+ if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
{
// buffer is too small?
wxFAIL_MSG(_T("strftime() failed"));
}
return wxString(buf);
+#else // !wxUSE_DATETIME
+ return wxEmptyString;
+#endif // wxUSE_DATETIME/!wxUSE_DATETIME
}
}
}
-void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
+void wxDoLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
// 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]);
{
#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);