]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/iniconf.cpp
* Fixes
[wxWidgets.git] / src / msw / iniconf.cpp
index d3035015971b31c8bbbb4856ea4f50ddb7e64fc4..b49e6d93486773db6f28d0c16e68f1509b40a4f6 100644 (file)
@@ -9,18 +9,16 @@
 // Licence:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
 
-// ============================================================================
-// declarations
-// ============================================================================
+#ifdef __GNUG__
+#pragma implementation "iniconf.h"
+#endif
 
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-#include  "wx/wxprec.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
 
-#ifdef    __BORLANDC__
-  #pragma hdrstop
-#endif  //__BORLANDC__
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
 
 #ifndef   WX_PRECOMP
   #include  <wx/string.h>
@@ -400,7 +398,7 @@ bool wxIniConfig::Flush(bool /* bCurrentOnly */)
 // delete
 // ----------------------------------------------------------------------------
 
-bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso)
+bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
 {
   // passing NULL as value to WritePrivateProfileString deletes the key
   if ( !Write(szKey, (const char *)NULL) )
@@ -419,7 +417,7 @@ bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso)
   return bOk;
 }
 
-bool wxIniConfig::DeleteGroup(const char *szKey)
+bool wxIniConfig::DeleteGroup(const wxString& szKey)
 {
   wxConfigPathChanger path(this, szKey);
 
@@ -434,6 +432,10 @@ bool wxIniConfig::DeleteGroup(const char *szKey)
   return bOk;
 }
 
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
 bool wxIniConfig::DeleteAll()
 {
   // first delete our group in win.ini
@@ -450,7 +452,7 @@ bool wxIniConfig::DeleteAll()
   wxString strFile = szBuf;
   strFile << '\\' << m_strLocalFilename;
 
-  if ( !DeleteFile(strFile) ) {
+  if ( !wxRemoveFile(strFile) ) {
     wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
     return FALSE;
   }