Bug 470522 - Threadpane context menuitem "Open Message in New Tab" should hide and enable in parallel with "Open Message in New Window", r=mkmelin
--- a/mail/base/content/mailContextMenus.js
+++ b/mail/base/content/mailContextMenus.js
@@ -134,22 +134,21 @@ function fillMailContextMenu(event)
(gContextMenu.onImage || gContextMenu.onLink);
var single = (numSelected == 1);
// Select-all and copy are only available in the message-pane
if (inThreadPane) {
document.getElementById("mailContext-selectall").hidden = true;
document.getElementById("mailContext-copy").hidden = true;
}
- ShowMenuItem("threadPaneContext-openNewTab", inThreadPane);
- // Show the Open in New Window option if applicable, and enable it if there's
- // exactly one message selected.
+ // Show the Open in New Window and New Tab options if there is exactly one
+ // message selected.
ShowMenuItem("mailContext-openNewWindow", single && inThreadPane);
- EnableMenuItem("mailContext-openNewWindow", single);
+ ShowMenuItem("threadPaneContext-openNewTab", single && inThreadPane);
/**
* Most menu items are visible if there's 1 or 0 messages selected, and
* enabled if there's exactly one selected. Handle those here.
* @param aID the id of the element to display/enable
* @param aHide (optional) an additional criteria to evaluate when we
* decide whether to display the element. If false, we'll hide
* the item no matter what messages are selected