// 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>
// 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) )
return bOk;
}
-bool wxIniConfig::DeleteGroup(const char *szKey)
+bool wxIniConfig::DeleteGroup(const wxString& szKey)
{
wxConfigPathChanger path(this, szKey);
return bOk;
}
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
bool wxIniConfig::DeleteAll()
{
// first delete our group in win.ini
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;
}