#include "wx/sizer.h"
#include "wx/statbmp.h"
#include "wx/button.h"
+ #include "wx/settings.h"
#endif // WX_PRECOMP
#if wxUSE_LOGGUI || wxUSE_LOGWINDOW
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();
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)
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');