X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0250efd6f46786c9152d305636dcbc4fdbeebecb..68ca12fef650ce4622e05ba4eb21a7aa23849107:/src/generic/logg.cpp diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index bd345d856f..cba360cc86 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -275,7 +275,7 @@ void wxLogGui::Flush() // do it right now to block any new calls to Flush() while we're here m_bHasMessages = false; - const unsigned repeatCount = wxLog::LogLastRepetitionCountIfNeeded(); + const unsigned repeatCount = LogLastRepetitionCountIfNeeded(); wxString appName = wxTheApp->GetAppDisplayName(); @@ -793,38 +793,17 @@ wxLogDialog::wxLogDialog(wxWindow *parent, wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); wxBoxSizer *sizerAll = new wxBoxSizer(isPda ? wxVERTICAL : wxHORIZONTAL); - wxBitmap bitmap; - switch ( style & wxICON_MASK ) + if (!isPda) { - case wxICON_ERROR: - bitmap = wxArtProvider::GetBitmap(wxART_ERROR, wxART_MESSAGE_BOX); -#ifdef __WXPM__ - bitmap.SetId(wxICON_SMALL_ERROR); -#endif - break; - - case wxICON_INFORMATION: - bitmap = wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_MESSAGE_BOX); -#ifdef __WXPM__ - bitmap.SetId(wxICON_SMALL_INFO); -#endif - break; - - case wxICON_WARNING: - bitmap = wxArtProvider::GetBitmap(wxART_WARNING, wxART_MESSAGE_BOX); -#ifdef __WXPM__ - bitmap.SetId(wxICON_SMALL_WARNING); -#endif - break; - - default: - wxFAIL_MSG(_T("incorrect log style")); + wxStaticBitmap *icon = new wxStaticBitmap + ( + this, + wxID_ANY, + wxArtProvider::GetMessageBoxIcon(style) + ); + sizerAll->Add(icon, 0, wxALIGN_CENTRE_VERTICAL); } - if (!isPda) - sizerAll->Add(new wxStaticBitmap(this, wxID_ANY, bitmap), 0, - wxALIGN_CENTRE_VERTICAL); - // create the text sizer with a minimal size so that we are sure it won't be too small wxString message = EllipsizeString(messages.Last()); wxSizer *szText = CreateTextSizer(message);