Bug 87150 - enter or double-click does not dismiss profile selection dialog. r=brade/sr=blake

This commit is contained in:
ccarlen%netscape.com 2001-06-28 14:21:35 +00:00
Родитель 39966986a8
Коммит 74e8b93014
3 изменённых файлов: 11 добавлений и 8 удалений

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

@ -269,9 +269,6 @@ function HandleKeyEvent( aEvent )
{
switch( aEvent.keyCode )
{
case 13:
onStart();
break;
case 46:
if( profileManagerMode != "manager" )
return;
@ -289,7 +286,11 @@ function HandleClickEvent( aEvent )
{
if( aEvent.detail == 2 && aEvent.button == 0 ) {
if( aEvent.target.nodeName.toLowerCase() == "treecell" &&
aEvent.target.parentNode.parentNode.nodeName.toLowerCase() != "treehead" )
return onStart();
aEvent.target.parentNode.parentNode.nodeName.toLowerCase() != "treehead" ) {
if (!onStart())
return false;
window.close();
return true;
}
}
}

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

@ -158,7 +158,7 @@ function loadElements()
// function : <profileSelection.js>::onStart();
// purpose : starts mozilla given the selected profile (user choice: "Start Mozilla")
// purpose : sets the current profile to the selected profile (user choice: "Start Mozilla")
function onStart()
{
var profileTree = document.getElementById("profiles");
@ -219,6 +219,8 @@ function onStart()
return;
}
// All this really does is set the current profile.
// It has nothing to do with starting the application.
profile.startApprunner(profilename);
}
catch (ex) {
@ -235,11 +237,11 @@ function onExit()
{
try {
profile.forgetCurrentProfile();
window.close();
}
catch (ex) {
dump("Failed to forget current profile.\n");
}
return true;
}
function foo()

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

@ -59,7 +59,7 @@
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileSelection.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileManager.js"/>
<keyset id="keyset">
<keyset id="dialogKeys">
<key id="fooKey" key="s" event="keydown" oncommand="foo()" modifiers="accel, shift"/>
</keyset>