X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/238d33aa53e54119ec03e325327874fdcf171607..9afe6c17502fc82d9af19c260ab4b8bedb7fe70e:/src/generic/logg.cpp diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 494df3262e..969ccb4b2d 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -59,6 +59,10 @@ #include "wx/msw/private.h" #endif // Windows +#ifdef __WXPM__ + #include +#endif + #if wxUSE_LOG_DIALOG #include "wx/listctrl.h" #include "wx/imaglist.h" @@ -742,11 +746,26 @@ wxLogDialog::wxLogDialog(wxWindow *parent, switch ( style & wxICON_MASK ) { case wxICON_ERROR: - bitmap = wxArtProvider::GetIcon(wxART_ERROR, wxART_MESSAGE_BOX); break; + bitmap = wxArtProvider::GetIcon(wxART_ERROR, wxART_MESSAGE_BOX); +#ifdef __WXPM__ + bitmap.SetId(wxICON_SMALL_ERROR); +#endif + break; + case wxICON_INFORMATION: - bitmap = wxArtProvider::GetIcon(wxART_INFORMATION, wxART_MESSAGE_BOX); break; + bitmap = wxArtProvider::GetIcon(wxART_INFORMATION, wxART_MESSAGE_BOX); +#ifdef __WXPM__ + bitmap.SetId(wxICON_SMALL_INFO); +#endif + break; + case wxICON_WARNING: - bitmap = wxArtProvider::GetIcon(wxART_WARNING, wxART_MESSAGE_BOX); break; + bitmap = wxArtProvider::GetIcon(wxART_WARNING, wxART_MESSAGE_BOX); +#ifdef __WXPM__ + bitmap.SetId(wxICON_SMALL_WARNING); +#endif + break; + default: wxFAIL_MSG(_T("incorrect log style")); } @@ -764,6 +783,15 @@ wxLogDialog::wxLogDialog(wxWindow *parent, SetSizer(sizerTop); // see comments in OnDetails() + // + // Note: Doing this, this way, triggered a nasty bug in + // wxTopLevelWindowGTK::GtkOnSize which took -1 literally once + // either of maxWidth or maxHeight was set. This symptom has been + // fixed there, but it is a problem that remains as long as we allow + // unchecked access to the internal size members. We really need to + // encapuslate window sizes more cleanly and make it clear when -1 will + // be substituted and when it will not. + wxSize size = sizerTop->Fit(this); m_maxHeight = size.y; SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight); @@ -1015,6 +1043,7 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event)) // we have to reset min size constraints or Fit() would never reduce the // dialog size when collapsing it and we have to reset max constraint // because it wouldn't expand it otherwise + m_minHeight = m_maxHeight = -1; @@ -1146,3 +1175,4 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) #endif // wxUSE_TEXTCTRL +// vi:sts=4:sw=4:et