#include "wx/intl.h"
#include "wx/log.h"
#include "wx/event.h"
+ #include "wx/app.h"
#endif //WX_PRECOMP
-#include "wx/app.h"
-
#include "wx/msw/registry.h"
#include "wx/msw/regconf.h"
// ----------------------------------------------------------------------------
// ctor/dtor
// ----------------------------------------------------------------------------
+IMPLEMENT_ABSTRACT_CLASS(wxRegConfig, wxConfigBase)
// create the config object which stores its data under HKCU\vendor\app and, if
// style & wxCONFIG_USE_GLOBAL_FILE, under HKLM\vendor\app
bool wxRegConfig::DeleteGroup(const wxString& key)
{
- wxConfigPathChanger path(this, key);
+ wxConfigPathChanger path(this, RemoveTrailingSeparator(key));
+
+ if ( !m_keyLocal.Exists() )
+ {
+ // nothing to do
+ return true;
+ }
+
+ if ( !LocalKey().DeleteKey(path.Name()) )
+ return false;
- return m_keyLocal.Exists() ? LocalKey().DeleteKey(path.Name()) : true;
+ path.UpdateIfDeleted();
+
+ return true;
}
bool wxRegConfig::DeleteAll()
return bOk;
}
-#endif
- // wxUSE_CONFIG
+#endif // wxUSE_CONFIG