X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/677ded95390173ee6a17fcb476608ca9c2b16fe5..3a39df31ff47004a46cfb06f3fb2d3e317f96d2b:/utils/configtool/src/configtoolview.cpp diff --git a/utils/configtool/src/configtoolview.cpp b/utils/configtool/src/configtoolview.cpp index ab770e3f59..59668482b3 100644 --- a/utils/configtool/src/configtoolview.cpp +++ b/utils/configtool/src/configtoolview.cpp @@ -21,6 +21,7 @@ #endif #include "wx/wfstream.h" +#include "wx/txtstrm.h" #include "configtoolview.h" #include "configtooldoc.h" #include "configtree.h" @@ -923,13 +924,14 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event)) wxString fullPath = dialog.GetPath(); wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath); - wxFileOutputStream stream(fullPath); - if (!stream.Ok()) + wxFileOutputStream osFile(fullPath); + if (!osFile.Ok()) { wxMessageBox(_("Sorry, could not save this file."), _("Save Setup File"), wxICON_EXCLAMATION|wxOK); return; } + wxTextOutputStream stream(osFile); stream << setupStr; } } @@ -955,13 +957,14 @@ void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event)) wxString fullPath = dialog.GetPath(); wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath); - wxFileOutputStream stream(fullPath); - if (!stream.Ok()) + wxFileOutputStream osFile(fullPath); + if (!osFile.Ok()) { wxMessageBox(_("Sorry, could not save this file."), _("Save Configure Command File"), wxICON_EXCLAMATION|wxOK); return; } + wxTextOutputStream stream(osFile); stream << configureStr; } }