added SetRecordDefaults() and IsRecordingDefaults() methods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1998-08-05 14:15:13 +00:00
parent 2bb0cd285a
commit baeed2892d
3 changed files with 13 additions and 3 deletions

View File

@@ -532,6 +532,8 @@ bool wxFileConfig::Read(wxString *pstr,
ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
if (pEntry == NULL) {
if(IsRecordingDefaults())
Write(szKey,szDefault);
*pstr = ExpandEnvVars(szDefault);
return FALSE;
}

View File

@@ -281,6 +281,9 @@ bool wxRegConfig::Read(wxString *pStr,
return TRUE;
}
if(IsRecordingDefaults())
Write(szKey,szDefault);
// default value
*pStr = szDefault;
return FALSE;