Fixed wxConfig (I hope) and disabled wxRegConfig::DeleteAll.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-20 12:23:40 +00:00
parent b953bdc293
commit 898efd1a88
4 changed files with 13 additions and 6 deletions

View File

@@ -226,7 +226,8 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer,
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 ))
@@ -235,7 +236,8 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer,
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);