From 2d922a976f736ec203619c478d905aac0bd5546a Mon Sep 17 00:00:00 2001 From: "flamingice%sourmilk.net" Date: Fri, 15 Jun 2007 21:19:09 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20363271,=20remove=20download=20manager=20h?= =?UTF-8?q?ack=20from=20richlistbox,=20Patch=20by=20Simon=20B=C3=83=C2=BCn?= =?UTF-8?q?zli,=20r=3Denn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@228138 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/content/widgets/richlistbox.xml | 5 ----- mozilla/toolkit/mozapps/downloads/content/downloads.js | 9 +++++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mozilla/toolkit/content/widgets/richlistbox.xml b/mozilla/toolkit/content/widgets/richlistbox.xml index 7bcc321723c..b45757d94e2 100644 --- a/mozilla/toolkit/content/widgets/richlistbox.xml +++ b/mozilla/toolkit/content/widgets/richlistbox.xml @@ -384,11 +384,6 @@ if (this.selType != "multiple" && this.selectedCount == 0) this.selectedItem = this.currentItem; - - // XXX hack for the Downloads manager (better to focus the list than - // the individual items - these usually aren't tabbable anyway, and - // we need the keyboard focus for navigation), see bug 363271: - this.focus(); ]]> diff --git a/mozilla/toolkit/mozapps/downloads/content/downloads.js b/mozilla/toolkit/mozapps/downloads/content/downloads.js index c1c63dc84c6..b58cb639973 100644 --- a/mozilla/toolkit/mozapps/downloads/content/downloads.js +++ b/mozilla/toolkit/mozapps/downloads/content/downloads.js @@ -173,9 +173,13 @@ function autoRemoveAndClose(aDownload) var autoClose = pref.getBoolPref(PREF_BDM_CLOSEWHENDONE); if (autoClose && (!window.opener || window.opener.location.href == window.location.href) && - gCanAutoClose && !gUserInteracted) + gCanAutoClose && !gUserInteracted) { gCloseDownloadManager(); + return true; + } } + + return false; } // This function can be overwritten by extensions that wish to place the Download Window in @@ -571,7 +575,8 @@ function Startup() gDownloadsView.controllers.appendController(gDownloadViewController); // downloads can finish before Startup() does, so check if the window should close - autoRemoveAndClose(); + if (!autoRemoveAndClose()) + gDownloadsView.focus(); } function Shutdown()