Bug 470522 - Threadpane context menuitem "Open Message in New Tab" should hide and enable in parallel with "Open Message in New Window", r=mkmelin
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 22 Mar 2009 19:45:02 -0700
changeset 2264 00ef42e8b45837d58213c35ae35907302a2bb013
parent 2263 248a69832af6b4a9ec78e172fb880c734388238a
child 2265 5e68dbbc5e3d8f0134e576bc28b433df2da4849c
push idunknown
push userunknown
push dateunknown
reviewersmkmelin
bugs470522
Bug 470522 - Threadpane context menuitem "Open Message in New Tab" should hide and enable in parallel with "Open Message in New Window", r=mkmelin
mail/base/content/mailContextMenus.js
--- 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