#pragma hdrstop
#endif //__BORLANDC__
-#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || defined(wxCONFIG_WIN32_NATIVE))
+#ifndef wxUSE_CONFIG_NATIVE
+ #define wxUSE_CONFIG_NATIVE 1
+#endif
+
+#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/app.h"
#include "wx/file.h"
{
if ( ms_bAutoCreate && ms_pConfig == NULL ) {
ms_pConfig =
- #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE)
+ #if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
#ifdef __WIN32__
new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
#else //WIN16
bool wxConfigBase::Write(const wxString& key, double val)
{
wxString str;
- str.Printf(_T("%f"), val);
+ str.Printf(wxT("%f"), val);
return Write(key, str);
}
return Write(key, l);
}
+bool wxConfigBase::Write( const wxString &key, const wxChar *text )
+{
+ wxString str( text ) ;
+ return Write( key, str ) ;
+}
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
wxString tmp; // Required for BC++
wxString strCurrent;
const wxChar *pc = sz;
for ( ;; ) {
- if ( *pc == _T('\0') || *pc == wxCONFIG_PATH_SEPARATOR ) {
- if ( strCurrent == _T(".") ) {
+ if ( *pc == wxT('\0') || *pc == wxCONFIG_PATH_SEPARATOR ) {
+ if ( strCurrent == wxT(".") ) {
// ignore
}
- else if ( strCurrent == _T("..") ) {
+ else if ( strCurrent == wxT("..") ) {
// go up one level
if ( aParts.IsEmpty() )
wxLogWarning(_("'%s' has extra '..', ignored."), sz);
//else:
// could log an error here, but we prefer to ignore extra '/'
- if ( *pc == _T('\0') )
+ if ( *pc == wxT('\0') )
return;
}
else