зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
983df02847
Коммит
1d257d32f6
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче