Bug 654966 - File > Save As > Template should not be active for NNTP folders. r=IanN.
authorEdmund Wong <ewong@pw-wspx.org>
Fri, 07 Oct 2011 00:03:22 +0800
changeset 9450 c6a8260db0aa54e116597f98fc11e2df9d0537d5
parent 9449 3f0cb19942bc5e536465d2a0a91ef647c81d0f02
child 9451 637ba790eb127c1281c59c9f95d8583325bc423f
push idunknown
push userunknown
push dateunknown
reviewersIanN
bugs654966
Bug 654966 - File > Save As > Template should not be active for NNTP folders. r=IanN.
suite/mailnews/mail3PaneWindowCommands.js
suite/mailnews/messageWindow.js
--- a/suite/mailnews/mail3PaneWindowCommands.js
+++ b/suite/mailnews/mail3PaneWindowCommands.js
@@ -291,17 +291,18 @@ var DefaultController =
       case "cmd_createFilterFromPopup":
       case "cmd_createFilterFromMenu":
         var loadedFolder = GetLoadedMsgFolder();
         if (!(loadedFolder && loadedFolder.server.canHaveFilters))
           return false;   // else fall thru
       case "cmd_saveAsFile":
         return GetNumSelectedMessages() > 0;
       case "cmd_saveAsTemplate":
-	      if ( GetNumSelectedMessages() > 1)
+        var target = gMessageBrowser.contentPrincipal.URI.scheme;
+        if (GetNumSelectedMessages() > 1 || target == "news")
           return false;   // else fall thru
       case "cmd_reply":
       case "button_reply":
       case "cmd_replySender":
       case "cmd_replyGroup":
       case "cmd_replyall":
       case "button_replyall":
       case "cmd_replySenderAndGroup":
--- a/suite/mailnews/messageWindow.js
+++ b/suite/mailnews/messageWindow.js
@@ -738,17 +738,20 @@ var MessageWindowController =
 			case "button_forward":
 			case "cmd_forwardInline":
 			case "cmd_forwardAttachment":
 			case "cmd_editAsNew":
 			case "cmd_print":
 			case "cmd_printpreview":
       case "button_print":
 			case "cmd_saveAsFile":
+        return true;
 			case "cmd_saveAsTemplate":
+        var target = gMessageBrowser.contentPrincipal.URI.scheme;
+        return target != "news";
 			case "cmd_viewPageSource":
 			case "cmd_reload":
 			case "cmd_find":
       case "button_mark":
 			case "cmd_markAsRead":
 			case "cmd_markAllRead":
 			case "cmd_markThreadAsRead":
 			case "cmd_markReadByDate":