diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 75d406dc7e..3acf1ea1e3 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -270,7 +270,11 @@ private: wxDebugReport& m_dbgrpt; +#if wxUSE_OWNER_DRAWN wxCheckListBox *m_checklst; +#else + wxListBox *m_checklst; +#endif wxTextCtrl *m_notes; wxArrayString m_files; @@ -342,7 +346,11 @@ wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt) wxSizerFlags().Border(wxTOP)); sizerFileBtns->AddStretchSpacer(1); +#if wxUSE_OWNER_DRAWN m_checklst = new wxCheckListBox(this, wxID_ANY); +#else + m_checklst = new wxListBox(this, wxID_ANY); +#endif wxSizer *sizerFiles = new wxBoxSizer(wxHORIZONTAL); sizerFiles->Add(m_checklst, flagsExpand); @@ -390,7 +398,9 @@ bool wxDebugReportDialog::TransferDataToWindow() if ( m_dbgrpt.GetFile(n, &name, &desc) ) { m_checklst->Append(name + wxT(" (") + desc + wxT(')')); +#if wxUSE_OWNER_DRAWN m_checklst->Check(n); +#endif m_files.Add(name); } @@ -401,6 +411,7 @@ bool wxDebugReportDialog::TransferDataToWindow() bool wxDebugReportDialog::TransferDataFromWindow() { +#if wxUSE_OWNER_DRAWN // any unchecked files should be removed from the report const size_t count = m_checklst->GetCount(); for ( size_t n = 0; n < count; n++ ) @@ -410,6 +421,7 @@ bool wxDebugReportDialog::TransferDataFromWindow() m_dbgrpt.RemoveFile(m_files[n]); } } +#endif // if the user entered any notes, add them to the report const wxString notes = m_notes->GetValue();