mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
selecting last profile loaded in profile tree. r=alecf@netscape.com
This commit is contained in:
parent
ffce833d24
commit
ff0bda8ba2
@ -39,9 +39,24 @@ function StartUp()
|
||||
SwitchProfileManagerMode();
|
||||
// bundle = srGetStrBundle("chrome://profile/locale/profileSelection.properties");
|
||||
loadElements();
|
||||
highlightCurrentProfile();
|
||||
DoEnabling();
|
||||
}
|
||||
|
||||
// select the last opened profile in the profile list
|
||||
function highlightCurrentProfile()
|
||||
{
|
||||
try {
|
||||
var currentProfile = profile.currentProfile;
|
||||
var currentProfileItem = document.getElementById( ( "profileName_" + currentProfile ) );
|
||||
var profileList = document.getElementById( "profiles" );
|
||||
profileList.selectItem( currentProfileItem );
|
||||
}
|
||||
catch(e) {
|
||||
dump("*** failed to select current profile in list\n");
|
||||
}
|
||||
}
|
||||
|
||||
// function : <profileSelection.js>::AddItem();
|
||||
// purpose : utility function for adding items to a tree.
|
||||
function AddItem( aChildren, aCells, aIdfier, aMigrate)
|
||||
@ -58,6 +73,7 @@ function AddItem( aChildren, aCells, aIdfier, aMigrate)
|
||||
item.appendChild(row);
|
||||
item.setAttribute("profile_name", aIdfier);
|
||||
item.setAttribute("rowName", aIdfier);
|
||||
item.setAttribute("id", ( "profileName_" + aIdfier ) );
|
||||
if( aMigrate )
|
||||
item.setAttribute("rowMigrate", "true");
|
||||
// 23/10/99 - no roaming access yet!
|
||||
|
Loading…
Reference in New Issue
Block a user