X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72957aa3ba10d6988560fd3f1f53b3be3387880e..a98ca1ae268c0a05784caf4f450e3d7fff382539:/src/msw/regconf.cpp?ds=sidebyside diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index af4dc5ab68..cb302531f9 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -33,8 +33,6 @@ #include "wx/config.h" -#ifndef __WIN16__ - #include "wx/msw/registry.h" #include "wx/msw/regconf.h" @@ -148,8 +146,8 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, if ( bDoUseGlobal ) { wxLogNull nolog; - m_keyGlobalRoot.Open(); - m_keyGlobal.Open(); + m_keyGlobalRoot.Open(wxRegKey::Read); + m_keyGlobal.Open(wxRegKey::Read); } } @@ -392,7 +390,7 @@ void wxRegConfig::SetPath(const wxString& strPath) m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); wxLogNull nolog; - m_keyGlobal.Open(); + m_keyGlobal.Open(wxRegKey::Read); } } @@ -688,7 +686,8 @@ bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName) // ---------------------------------------------------------------------------- // deleting // ---------------------------------------------------------------------------- -bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmptyAlso)) + +bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) { wxConfigPathChanger path(this, value); @@ -696,7 +695,7 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmpty if ( !m_keyLocal.DeleteValue(path.Name()) ) return FALSE; - if ( m_keyLocal.IsEmpty() ) { + if ( bGroupIfEmptyAlso && m_keyLocal.IsEmpty() ) { wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); SetPath(_T("..")); // changes m_keyLocal return LocalKey().DeleteKey(strKey); @@ -728,8 +727,5 @@ bool wxRegConfig::DeleteAll() return bOk; } -#endif - // __WIN16__ - #endif // wxUSE_CONFIG