add newlines to the end of some files, and add the defaultProfileDir interface

and for ben.  r=alecf
This commit is contained in:
sspitzer%netscape.com 2000-02-05 21:48:09 +00:00
Родитель 056f1ee871
Коммит 4664dbb0fa
5 изменённых файлов: 20 добавлений и 2 удалений

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

@ -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