+ if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) {
+ if ( m_keyLocal.HasValue(path.Name()) ) {
+ wxLogWarning("User value for immutable key '%s' ignored.",
+ path.Name().c_str());
+ }
+ *pStr = wxConfigBase::ExpandEnvVars(*pStr);
+ return TRUE;
+ }
+ else {
+ // don't waste time - it's not there anyhow
+ bQueryGlobal = FALSE;
+ }
+ }
+
+ // first try local key
+ if ( TryGetValue(m_keyLocal, path.Name(), *pStr) ||
+ (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), *pStr)) ) {
+ // nothing to do
+
+ // TODO: do we return TRUE? Not in original implementation,
+ // but I don't see why not. -- JACS
+ *pStr = wxConfigBase::ExpandEnvVars(*pStr);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+bool wxRegConfig::Read(const wxString& key, wxString *pStr,
+ const wxString& szDefault) const
+{
+ wxConfigPathChanger path(this, key);
+
+ bool bQueryGlobal = TRUE;
+
+ // if immutable key exists in global key we must check that it's not
+ // overriden by the local key with the same name
+ if ( IsImmutable(path.Name()) ) {
+ if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) {