workaround fix for #26885. changes for ben to the nsIProfile interface

r=ben@netscape.com
This commit is contained in:
sspitzer%netscape.com 2000-02-08 01:04:41 +00:00
Родитель 45cba2f810
Коммит 3b6d8a6900
3 изменённых файлов: 27 добавлений и 8 удалений

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

@ -95,7 +95,7 @@ interface nsIProfile : nsISupports {
attribute boolean automigrate;
readonly attribute nsIFileSpec defaultProfileDir;
readonly attribute nsIFileSpec defaultProfileParentDir;
};
#endif /* nsIProfile_h__ */

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

@ -15,15 +15,37 @@ function handleCancelButton()
function onLoad()
{
bundle = srGetStrBundle("chrome://profile/locale/migration.properties");
try {
bundle = srGetStrBundle("chrome://profile/locale/migration.properties");
}
catch (ex) {
dump("please fix bug #26291\n");
}
doSetOKCancel(handleOKButton, handleCancelButton);
var okButton = document.getElementById("ok");
var cancelButton = document.getElementById("cancel");
if( !okButton || !cancelButton )
return false;
okButton.setAttribute( "value", bundle.GetStringFromName( "migrate" ) );
try {
okButton.setAttribute( "value", bundle.GetStringFromName( "migrate" ) );
}
catch (ex) {
dump("please fix bug #26291\n");
okButton.setAttribute( "value", "Migrate *");
}
okButton.setAttribute( "class", ( okButton.getAttribute( "class" ) + " padded" ) );
cancelButton.setAttribute( "value", bundle.GetStringFromName( "newprofile" ) );
try {
cancelButton.setAttribute( "value", bundle.GetStringFromName( "newprofile" ) );
}
catch (ex) {
dump("please fix bug #26291\n");
cancelButton.setAttribute("value","New Profile *");
}
cancelButton.setAttribute( "class", ( cancelButton.getAttribute( "class" ) + " padded" ) );
centerWindowOnScreen();
}

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

@ -649,7 +649,7 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const char *profileName, nsFileSpec* prof
return rv;
}
NS_IMETHODIMP nsProfile::GetDefaultProfileDir(nsIFileSpec **aDefaultProfileDir)
NS_IMETHODIMP nsProfile::GetDefaultProfileParentDir(nsIFileSpec **aDefaultProfileDir)
{
nsresult rv;
@ -659,9 +659,6 @@ NS_IMETHODIMP nsProfile::GetDefaultProfileDir(nsIFileSpec **aDefaultProfileDir)
rv = locator->GetFileLocation(nsSpecialFileSpec::App_DefaultUserProfileRoot50, aDefaultProfileDir);
if (NS_FAILED(rv) || !aDefaultProfileDir || !*aDefaultProfileDir) return NS_ERROR_FAILURE;
rv = (*aDefaultProfileDir)->AppendRelativeUnixPath(DEFAULT_PROFILE_NAME);
if (NS_FAILED(rv)) return rv;
return NS_OK;
}