зеркало из https://github.com/mozilla/pjs.git
add newlines to the end of some files, and add the defaultProfileDir interface
and for ben. r=alecf
This commit is contained in:
Родитель
056f1ee871
Коммит
4664dbb0fa
|
@ -94,6 +94,8 @@ interface nsIProfile : nsISupports {
|
|||
boolean isCurrentProfileAvailable();
|
||||
|
||||
attribute boolean automigrate;
|
||||
|
||||
readonly attribute nsIFileSpec defaultProfileDir;
|
||||
};
|
||||
|
||||
#endif /* nsIProfile_h__ */
|
||||
|
|
|
@ -81,6 +81,7 @@ function onCancel()
|
|||
function onFinish()
|
||||
{
|
||||
dump("*** IN ONFINISH\n");
|
||||
|
||||
// check if we're at final stage
|
||||
if( !wizardManager.wizardMap[wizardManager.currentPageTag].finish )
|
||||
return;
|
||||
|
|
|
@ -170,4 +170,4 @@ function updateProfileName( aTextFieldElement )
|
|||
var stringValue = rootFolder + aTextFieldElement.value;
|
||||
folderDisplayElement.setAttribute( "value", stringValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,4 +291,4 @@ function HandleClickEvent( aEvent )
|
|||
}
|
||||
else
|
||||
return showSelection(aEvent.target.parentNode.parentNode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -649,6 +649,21 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const char *profileName, nsFileSpec* prof
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsProfile::GetDefaultProfileDir(nsIFileSpec **aDefaultProfileDir)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv);
|
||||
if (NS_FAILED(rv) || !locator) return NS_ERROR_FAILURE;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// Gets the number of profiles
|
||||
// Location: Common/Profiles
|
||||
|
|
Загрузка…
Ссылка в новой задаче