]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configtoolview.cpp
Fixes tex2rtf to search for files on current folder too. This is basically to test...
[wxWidgets.git] / utils / configtool / src / configtoolview.cpp
index ab770e3f59079342d0279ca225ca7e7029d3392b..0005f52690322178235ca5f62d2819846b859e13 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "configtoolview.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -21,6 +17,7 @@
 #endif
 
 #include "wx/wfstream.h"
 #endif
 
 #include "wx/wfstream.h"
+#include "wx/txtstrm.h"
 #include "configtoolview.h"
 #include "configtooldoc.h"
 #include "configtree.h"
 #include "configtoolview.h"
 #include "configtooldoc.h"
 #include "configtree.h"
@@ -916,20 +913,21 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event))
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Setup File As"),
         path, filename ,
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Setup File As"),
         path, filename ,
-        wildcard, wxSAVE|wxOVERWRITE_PROMPT);
+        wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
 
     if (dialog.ShowModal() == wxID_OK)
     {
         wxString fullPath = dialog.GetPath();
         wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath);
 
 
     if (dialog.ShowModal() == wxID_OK)
     {
         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;
         }
 
         {
             wxMessageBox(_("Sorry, could not save this file."), _("Save Setup File"), wxICON_EXCLAMATION|wxOK);
             return;
         }
 
+        wxTextOutputStream stream(osFile);
         stream << setupStr;
     }
 }
         stream << setupStr;
     }
 }
@@ -948,20 +946,21 @@ void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event))
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Configure Command File As"),
         path, filename ,
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Configure Command File As"),
         path, filename ,
-        wildcard, wxSAVE|wxOVERWRITE_PROMPT);
+        wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
 
     if (dialog.ShowModal() == wxID_OK)
     {
         wxString fullPath = dialog.GetPath();
         wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath);
 
 
     if (dialog.ShowModal() == wxID_OK)
     {
         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;
         }
 
         {
             wxMessageBox(_("Sorry, could not save this file."), _("Save Configure Command File"), wxICON_EXCLAMATION|wxOK);
             return;
         }
 
+        wxTextOutputStream stream(osFile);
         stream << configureStr;
     }
 }
         stream << configureStr;
     }
 }