]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configtoolview.cpp
Warning fix.
[wxWidgets.git] / utils / configtool / src / configtoolview.cpp
index ab770e3f59079342d0279ca225ca7e7029d3392b..59668482b398603efccdd459409abf2cf45060bd 100644 (file)
@@ -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;
     }
 }