From 96f4899d16fce6848836f160f2e21f0cde3bd726 Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Tue, 11 Jun 2013 17:10:57 -0400 Subject: [PATCH] Bug 873053 - Make Downloads button open the Library if it's in the menu panel. r=mak. --- browser/components/downloads/content/indicator.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/browser/components/downloads/content/indicator.js b/browser/components/downloads/content/indicator.js index b0e3217e5b37..fed88993480e 100644 --- a/browser/components/downloads/content/indicator.js +++ b/browser/components/downloads/content/indicator.js @@ -523,7 +523,14 @@ const DownloadsIndicatorView = { DownloadsCommon.getIndicatorData(window).attention = false; BrowserDownloadsUI(); } else { - DownloadsPanel.showPanel(); + // If the downloads button is in the menu panel, open the Library + let widgetGroup = CustomizableUI.getWidget("downloads-button"); + let widget = widgetGroup.forWindow(window); + if (widget.areaType == CustomizableUI.AREATYPE_MENU_PANEL) { + DownloadsPanel.showDownloadsHistory(); + } else { + DownloadsPanel.showPanel(); + } } aEvent.stopPropagation();