{
// VZ: it seems that DeleteAll() wreaks havoc on NT. Disabled until I
// investigate it further, do _not_ compile this code in meanwhile!
-#if 0
- if ( wxConfigBase::Get()->DeleteAll() ) {
+ // JACS: wxRegConfig::DeleteAll is disabled, so it's safe to call DeleteAll,
+ // it just won't do anything useful on Win95/NT.
+ if ( wxConfigBase::Get()->DeleteAll() ) {
wxLogMessage("Config file/registry key successfully deleted.");
delete wxConfigBase::Set((wxConfigBase *) NULL);
wxConfigBase::DontCreateOnDemand();
}
else
-#endif // 0
wxLogError("Deleting config file/registry key failed.");
}
const wxString& strEntry)
{
m_pContainer = (wxConfigBase *)pContainer;
- wxString strPath = strEntry.Before(wxCONFIG_PATH_SEPARATOR);
+// wxString strPath = strEntry.Before(wxCONFIG_PATH_SEPARATOR);
+ wxString strPath = strEntry.BeforeLast(wxCONFIG_PATH_SEPARATOR);
// special case of "/keyname" when there is nothing before "/"
if ( strPath.IsEmpty() && ((!strEntry.IsEmpty()) && strEntry[0] == wxCONFIG_PATH_SEPARATOR ))
if ( !strPath.IsEmpty() ) {
// do change the path
m_bChanged = TRUE;
- m_strName = strEntry.Right(wxCONFIG_PATH_SEPARATOR);
+// m_strName = strEntry.Right(wxCONFIG_PATH_SEPARATOR);
+ m_strName = strEntry.AfterLast(wxCONFIG_PATH_SEPARATOR);
m_strOldPath = m_pContainer->GetPath();
m_strOldPath += wxCONFIG_PATH_SEPARATOR;
m_pContainer->SetPath(strPath);
{
m_keyLocal.Close();
m_keyGlobal.Close();
-
+#if 1
+ wxFAIL_MSG("wxRegConfig::DeleteAll will wipe out your entire registry, so please do not use until it's fixed!");
+ return FALSE;
+#else
bool bOk = m_keyLocalRoot.DeleteSelf();
if ( bOk )
bOk = m_keyGlobalRoot.DeleteSelf();
return bOk;
+#endif
}
#endif