strDir << szHome;
#else // Win16
// Win16 has no idea about home, so use the current directory instead
- strDir = ".\\";
+ strDir = ".\\";
#endif // WIN16/32
#endif // UNIX/Win
: m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
{
// if the path is not absolute, prepend the standard directory to it
-
- if ( !strLocal.IsEmpty() && !wxIsPathSeparator(strLocal[0u]) )
+ if ( !strLocal.IsEmpty() && !wxIsAbsolutePath(strLocal) )
{
m_strLocalFile = GetLocalDir();
m_strLocalFile << strLocal;
}
- if ( !strGlobal.IsEmpty() && !wxIsPathSeparator(strGlobal[0u]) )
+ if ( !strGlobal.IsEmpty() && !wxIsAbsolutePath(strGlobal) )
{
m_strGlobalFile = GetGlobalDir();
m_strGlobalFile << strGlobal;
}
+
Init();
}
ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
if (pEntry == NULL) {
+ if( IsRecordingDefaults() )
+ ((wxFileConfig *)this)->Write(szKey,szDefault);
*pstr = ExpandEnvVars(szDefault);
return FALSE;
}
wxString strName = path.Name();
if ( strName.IsEmpty() ) {
// setting the value of a group is an error
- wxASSERT_MSG( IsEmpty(szValue), "can't set value of a group!" );
+ wxASSERT_MSG( IsEmpty(szValue), _("can't set value of a group!") );
// ... except if it's empty in which case it's a way to force it's creation
m_pCurrentGroup->SetDirty();
{
CleanUp();
- m_strLocalFile = m_strGlobalFile = "";
- Init();
-
const char *szFile = m_strLocalFile;
if ( remove(szFile) == -1 )
wxLogSysError(_("can't delete user configuration file '%s'"), szFile);
- szFile = m_strGlobalFile;
- if ( remove(szFile) )
- wxLogSysError(_("can't delete system configuration file '%s'"), szFile);
+ m_strLocalFile = m_strGlobalFile = "";
+ Init();
return TRUE;
}
break;
case '"':
- if ( bQuote )
+ if ( bQuote ) {
c = '"';
+ break;
+ }
//else: fall through
default: