X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b165ed6b209ea9f5ddd7bfb1813c6f0718a9a3d..e7ca6139d062c37cc7c056b6647097e999b714cd:/src/generic/logg.cpp?ds=sidebyside diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 68555e35e6..155628d827 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -44,6 +44,7 @@ #include "wx/sizer.h" #include "wx/statbmp.h" #include "wx/button.h" + #include "wx/settings.h" #endif // WX_PRECOMP #if wxUSE_LOGGUI || wxUSE_LOGWINDOW @@ -244,9 +245,6 @@ void wxLogGui::Flush() 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 @@ -262,7 +260,7 @@ void wxLogGui::Flush() { #if wxUSE_LOG_DIALOG - wxLogDialog dlg(parent, + wxLogDialog dlg(NULL, m_aMessages, m_aSeverity, m_aTimes, title, style); @@ -294,7 +292,7 @@ void wxLogGui::Flush() // situation without it if ( !!str ) { - wxMessageBox(str, title, wxOK | style, parent); + wxMessageBox(str, title, wxOK | style); // no undisplayed messages whatsoever Clear(); @@ -869,7 +867,13 @@ void wxLogDialog::CreateDetailsControls() int y; GetTextExtent(_T("H"), (int*)NULL, &y, (int*)NULL, (int*)NULL, &font); int height = wxMax(y*(count + 3), 100); - m_listctrl->SetSize(-1, height); + + // 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; + + m_listctrl->SetSize(-1, wxMin(height, heightMax)); } void wxLogDialog::OnListSelect(wxListEvent& event) @@ -1069,7 +1073,7 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) wxString msg; TimeStamp(&msg); -#ifdef __WXMAC__ +#if defined(__WXMAC__) && !defined(__DARWIN__) // VZ: this is a bug in wxMac, it *must* accept '\n' as new line, the // translation must be done in wxTextCtrl, not here! (FIXME) msg << szString << wxT('\r');