// accepts an additional argument which tells to which frame the output should
// be directed
-void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
+void wxVLogStatus(wxFrame *pFrame, const wxChar *szFormat, va_list argptr)
{
wxString msg;
wxLog *pLog = wxLog::GetActiveTarget();
if ( pLog != NULL ) {
- va_list argptr;
- va_start(argptr, szFormat);
msg.PrintfV(szFormat, argptr);
- va_end(argptr);
wxASSERT( gs_pFrame == NULL ); // should be reset!
gs_pFrame = pFrame;
}
}
+void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
+{
+ va_list argptr;
+ va_start(argptr, szFormat);
+ wxVLogStatus(pFrame, szFormat, argptr);
+ va_end(argptr);
+}
+
// ----------------------------------------------------------------------------
// wxLogGui implementation (FIXME MT-unsafe)
// ----------------------------------------------------------------------------
wxString title;
title.Printf(titleFormat, appName.c_str());
- // this is the best we can do here
- wxWindow *parent = wxTheApp->GetTopWindow();
-
size_t nMsgCount = m_aMessages.Count();
// avoid showing other log dialogs until we're done with the dialog we're
{
#if wxUSE_LOG_DIALOG
- wxLogDialog dlg(parent,
+ wxLogDialog dlg(NULL,
m_aMessages, m_aSeverity, m_aTimes,
title, style);
// situation without it
if ( !!str )
{
- wxMessageBox(str, title, wxOK | style, parent);
+ wxMessageBox(str, title, wxOK | style);
// no undisplayed messages whatsoever
Clear();
if ( GetVerbose() )
case wxLOG_Message:
{
- if ( !m_bErrors ) {
- m_aMessages.Add(szString);
- m_aSeverity.Add(wxLOG_Message);
- m_aTimes.Add((long)t);
- m_bHasMessages = TRUE;
- }
+ m_aMessages.Add(szString);
+ m_aSeverity.Add(wxLOG_Message);
+ m_aTimes.Add((long)t);
+ m_bHasMessages = TRUE;
}
break;
wxDefaultSize,
wxTE_MULTILINE |
wxHSCROLL |
+ // needed for Win32 to avoid 65Kb limit but it doesn't work well
+ // when using RichEdit 2.0 which we always do in the Unicode build
+#if !wxUSE_UNICODE
+ wxTE_RICH |
+#endif // !wxUSE_UNICODE
wxTE_READONLY);
#if wxUSE_MENUS
// if the height as computed from list items exceeds, together with the
// actual message & controls, the screen, make it smaller
int heightMax =
- (3*wxSystemSettings::GetSystemMetric(wxSYS_SCREEN_Y))/5 - GetSize().y;
+ (3*wxSystemSettings::GetMetric(wxSYS_SCREEN_Y))/5 - GetSize().y;
m_listctrl->SetSize(-1, wxMin(height, heightMax));
}