зеркало из https://github.com/mozilla/gecko-dev.git
Bug 87150 - enter or double-click does not dismiss profile selection dialog. r=brade/sr=blake
This commit is contained in:
Родитель
39966986a8
Коммит
74e8b93014
|
@ -269,9 +269,6 @@ function HandleKeyEvent( aEvent )
|
||||||
{
|
{
|
||||||
switch( aEvent.keyCode )
|
switch( aEvent.keyCode )
|
||||||
{
|
{
|
||||||
case 13:
|
|
||||||
onStart();
|
|
||||||
break;
|
|
||||||
case 46:
|
case 46:
|
||||||
if( profileManagerMode != "manager" )
|
if( profileManagerMode != "manager" )
|
||||||
return;
|
return;
|
||||||
|
@ -289,7 +286,11 @@ function HandleClickEvent( aEvent )
|
||||||
{
|
{
|
||||||
if( aEvent.detail == 2 && aEvent.button == 0 ) {
|
if( aEvent.detail == 2 && aEvent.button == 0 ) {
|
||||||
if( aEvent.target.nodeName.toLowerCase() == "treecell" &&
|
if( aEvent.target.nodeName.toLowerCase() == "treecell" &&
|
||||||
aEvent.target.parentNode.parentNode.nodeName.toLowerCase() != "treehead" )
|
aEvent.target.parentNode.parentNode.nodeName.toLowerCase() != "treehead" ) {
|
||||||
return onStart();
|
if (!onStart())
|
||||||
|
return false;
|
||||||
|
window.close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ function loadElements()
|
||||||
|
|
||||||
|
|
||||||
// function : <profileSelection.js>::onStart();
|
// 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()
|
function onStart()
|
||||||
{
|
{
|
||||||
var profileTree = document.getElementById("profiles");
|
var profileTree = document.getElementById("profiles");
|
||||||
|
@ -219,6 +219,8 @@ function onStart()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// All this really does is set the current profile.
|
||||||
|
// It has nothing to do with starting the application.
|
||||||
profile.startApprunner(profilename);
|
profile.startApprunner(profilename);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
@ -235,11 +237,11 @@ function onExit()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
profile.forgetCurrentProfile();
|
profile.forgetCurrentProfile();
|
||||||
window.close();
|
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
dump("Failed to forget current profile.\n");
|
dump("Failed to forget current profile.\n");
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function foo()
|
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/profileSelection.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileManager.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"/>
|
<key id="fooKey" key="s" event="keydown" oncommand="foo()" modifiers="accel, shift"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче