added AddText() function (trivial wrapper around AddFile()), use it in debug rpt preview

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-04-09 16:04:22 +00:00
parent 7227f7b857
commit e18c3e0207
3 changed files with 24 additions and 8 deletions

View File

@@ -389,14 +389,8 @@ bool wxDebugReportDialog::TransferDataFromWindow()
const wxString notes = m_notes->GetValue();
if ( !notes.empty() )
{
// for now it's fixed, could make it configurable in the future...
const wxChar *NOTES_FILE_NAME = _T("notes.txt");
wxFileName fn(m_dbgrpt.GetDirectory(), NOTES_FILE_NAME);
wxFFile file(fn.GetFullPath(), _T("w"));
if ( file.IsOpened() && file.Write(notes) )
{
m_dbgrpt.AddFile(NOTES_FILE_NAME, _T("user notes"));
}
// for now filename fixed, could make it configurable in the future...
m_dbgrpt.AddText(_T("notes.txt"), notes, _T("user notes"));
}
return true;