X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e822d1bd5fc4f3ac91fafd201d7519d091408dd2..8d6e8e45fe72afcb38d1da3b2b90c307ac052b0c:/src/generic/logg.cpp diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index ed2a915892..dfe188e3bb 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -127,7 +127,6 @@ public: #if CAN_SAVE_FILES void OnSave(wxCommandEvent& event); #endif // CAN_SAVE_FILES - void OnListSelect(wxListEvent& event); void OnListItemActivated(wxListEvent& event); private: @@ -171,7 +170,7 @@ private: static size_t ms_maxLength; DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxLogDialog) + wxDECLARE_NO_COPY_CLASS(wxLogDialog); }; BEGIN_EVENT_TABLE(wxLogDialog, wxDialog) @@ -182,7 +181,6 @@ BEGIN_EVENT_TABLE(wxLogDialog, wxDialog) #if CAN_SAVE_FILES EVT_BUTTON(wxID_SAVE, wxLogDialog::OnSave) #endif // CAN_SAVE_FILES - EVT_LIST_ITEM_SELECTED(wxID_ANY, wxLogDialog::OnListSelect) EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxLogDialog::OnListItemActivated) END_EVENT_TABLE() @@ -235,7 +233,7 @@ void wxVLogStatus(wxFrame *pFrame, const wxString& format, va_list argptr) #else wxLog::OnLog(wxLOG_Status, msg, time(NULL)); #endif - gs_pFrame = (wxFrame *) NULL; + gs_pFrame = NULL; } } @@ -340,7 +338,8 @@ wxLogGui::DoShowMultipleLogMessages(const wxArrayString& messages, #else // !wxUSE_LOG_DIALOG // start from the most recent message wxString message; - str.reserve(nMsgCount*100); + 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"); } @@ -560,7 +559,7 @@ private: DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxLogFrame) + wxDECLARE_NO_COPY_CLASS(wxLogFrame); }; BEGIN_EVENT_TABLE(wxLogFrame, wxFrame) @@ -793,7 +792,7 @@ bool wxLogWindow::OnFrameClose(wxFrame * WXUNUSED(frame)) void wxLogWindow::OnFrameDelete(wxFrame * WXUNUSED(frame)) { - m_pLogFrame = (wxLogFrame *)NULL; + m_pLogFrame = NULL; } wxLogWindow::~wxLogWindow() @@ -1052,14 +1051,6 @@ void wxLogDialog::CreateDetailsControls(wxWindow *parent) m_listctrl->SetSize(wxDefaultCoord, wxMin(height, heightMax)); } -void wxLogDialog::OnListSelect(wxListEvent& event) -{ - // we can't just disable the control because this looks ugly under Windows - // (wrong bg colour, no scrolling...), but we still want to disable - // selecting items - it makes no sense here - m_listctrl->SetItemState(event.GetIndex(), 0, wxLIST_STATE_SELECTED); -} - void wxLogDialog::OnListItemActivated(wxListEvent& event) { // show the activated item in a message box