Fixing bugs 28243, 27402 and 27850. MozRegistry is updated whenever the profile information is changed. This allows profile selector reflect the registry values directly. r=sspitzer,norris. a=jar,phil

This commit is contained in:
racham%netscape.com 2000-02-22 00:01:39 +00:00
Родитель 983df02847
Коммит 1d257d32f6
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -872,6 +872,7 @@ NS_IMETHODIMP nsProfile::CreateNewProfile(const char* profileName, const char* n
gProfileDataAccess->mNumProfiles++;
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
gProfileDataAccess->UpdateRegistry();
return NS_OK;
}
@ -977,6 +978,7 @@ NS_IMETHODIMP nsProfile::RenameProfile(const char* oldName, const char* newName)
if (NS_FAILED(rv)) return rv;
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
gProfileDataAccess->UpdateRegistry();
return NS_OK;
}
@ -1053,6 +1055,7 @@ NS_IMETHODIMP nsProfile::DeleteProfile(const char* profileName, PRBool canDelete
if (NS_FAILED(rv)) return rv;
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
gProfileDataAccess->UpdateRegistry();
return rv;
}
@ -1156,6 +1159,8 @@ NS_IMETHODIMP nsProfile::MigrateProfileInfo()
#endif /* XP_PC || XP_MAC */
gProfileDataAccess->UpdateRegistry();
return rv;
}
@ -1251,6 +1256,7 @@ NS_IMETHODIMP nsProfile::MigrateProfile(const char* profileName, PRBool showProg
gProfileDataAccess->mNumOldProfiles--;
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
gProfileDataAccess->UpdateRegistry();
return rv;
}

Просмотреть файл

@ -653,8 +653,11 @@ nsProfileAccess::UpdateRegistry()
if (NS_FAILED(rv)) return rv;
// Set the current profile
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_CURRENT_PROFILE_STRING, mCurrentProfile);
if (NS_FAILED(rv)) return rv;
if (mCurrentProfile)
{
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_CURRENT_PROFILE_STRING, mCurrentProfile);
if (NS_FAILED(rv)) return rv;
}
// Set the registry version
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_VERSION_STRING, mVersion);