Bug 873053 - Make Downloads button open the Library if it's in the menu panel. r=mak.

This commit is contained in:
Mike Conley 2013-06-11 17:10:57 -04:00
parent c5b1a88441
commit 96f4899d16

View File

@ -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();