From 74e8b93014857f4b755864a67ac9da7f4926fe9e Mon Sep 17 00:00:00 2001 From: "ccarlen%netscape.com" Date: Thu, 28 Jun 2001 14:21:35 +0000 Subject: [PATCH] Bug 87150 - enter or double-click does not dismiss profile selection dialog. r=brade/sr=blake --- profile/resources/content/profileManager.js | 11 ++++++----- profile/resources/content/profileSelection.js | 6 ++++-- profile/resources/content/profileSelection.xul | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/profile/resources/content/profileManager.js b/profile/resources/content/profileManager.js index 738622658694..7a6dd7308d09 100644 --- a/profile/resources/content/profileManager.js +++ b/profile/resources/content/profileManager.js @@ -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; + } } } diff --git a/profile/resources/content/profileSelection.js b/profile/resources/content/profileSelection.js index 6651bd3af491..ab6314dcf814 100644 --- a/profile/resources/content/profileSelection.js +++ b/profile/resources/content/profileSelection.js @@ -158,7 +158,7 @@ function loadElements() // function : ::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() diff --git a/profile/resources/content/profileSelection.xul b/profile/resources/content/profileSelection.xul index 76d22d189571..3efb2e240963 100644 --- a/profile/resources/content/profileSelection.xul +++ b/profile/resources/content/profileSelection.xul @@ -59,7 +59,7 @@