+int wxLogGui::GetSeverityIcon() const
+{
+ return m_bErrors ? wxICON_STOP
+ : m_bWarnings ? wxICON_EXCLAMATION
+ : wxICON_INFORMATION;
+}
+
+wxString wxLogGui::GetTitle() const
+{
+ wxString titleFormat;
+ switch ( GetSeverityIcon() )
+ {
+ case wxICON_STOP:
+ titleFormat = _("%s Error");
+ break;
+
+ case wxICON_EXCLAMATION:
+ titleFormat = _("%s Warning");
+ break;
+
+ default:
+ wxFAIL_MSG( "unexpected icon severity" );
+ // fall through
+
+ case wxICON_INFORMATION:
+ titleFormat = _("%s Information");
+ }
+
+ return wxString::Format(titleFormat, wxTheApp->GetAppDisplayName());
+}
+
+void
+wxLogGui::DoShowSingleLogMessage(const wxString& message,
+ const wxString& title,
+ int style)
+{
+ wxMessageBox(message, title, wxOK | style);
+}
+
+void
+wxLogGui::DoShowMultipleLogMessages(const wxArrayString& messages,
+ const wxArrayInt& severities,
+ const wxArrayLong& times,
+ const wxString& title,
+ int style)
+{
+#if wxUSE_LOG_DIALOG
+ wxLogDialog dlg(NULL,
+ messages, severities, times,
+ title, style);
+
+ // clear the message list before showing the dialog because while it's
+ // shown some new messages may appear
+ Clear();
+
+ (void)dlg.ShowModal();
+#else // !wxUSE_LOG_DIALOG
+ // start from the most recent message
+ wxString message;
+ const size_t nMsgCount = messages.size();
+ message.reserve(nMsgCount*100);
+ for ( size_t n = nMsgCount; n > 0; n-- ) {
+ message << m_aMessages[n - 1] << wxT("\n");
+ }
+
+ DoShowSingleLogMessage(message, title, style);
+#endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG
+}
+