Bug 680446 - Printing more than one e-mails at the same time reduces the message content. Multiple selection prints only summary. r=bwinton,a=Standard8 SEAMONKEY_2_4b3_BUILD1 SEAMONKEY_2_4b3_RELEASE
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 16 Sep 2011 13:42:00 -0700
changeset 8475 b7ed5fe0f2b7c63ca4cfa76762538f84589e6fc1
parent 8473 0627ba566647a71c2ac2a9c4b5687caf9ca3e135
child 8476 57225c7321d68ee7f67a1abe9807c027a206b47a
child 8479 54d30d81e9743f38a45fac56b70a198e971dc4ce
child 8480 a533b8b76f9c9c4cab372336d62dbc7f7715051e
push idunknown
push userunknown
push dateunknown
reviewersbwinton, Standard8
bugs680446
Bug 680446 - Printing more than one e-mails at the same time reduces the message content. Multiple selection prints only summary. r=bwinton,a=Standard8
mail/base/content/mail3PaneWindowCommands.js
mail/base/content/mailWindowOverlay.js
--- a/mail/base/content/mail3PaneWindowCommands.js
+++ b/mail/base/content/mail3PaneWindowCommands.js
@@ -334,16 +334,17 @@ var DefaultController =
       case "button_replylist":
       case "cmd_forward":
       case "button_forward":
       case "cmd_forwardInline":
       case "cmd_forwardAttachment":
       case "cmd_editAsNew":
       case "cmd_openMessage":
       case "button_print":
+      case "cmd_print":
       case "cmd_viewPageSource":
       case "cmd_reload":
       case "cmd_applyFiltersToSelection":
         let numSelected = GetNumSelectedMessages();
         if (command == "cmd_applyFiltersToSelection")
         {
           var whichText = "valueMessage";
           if (numSelected > 1)
@@ -354,39 +355,34 @@ var DefaultController =
         if (numSelected > 0)
         {
           if (!gFolderDisplay.getCommandStatus(nsMsgViewCommandType.cmdRequiringMsgBody))
             return false;
 
           // Check if we have a collapsed thread selected and are summarizing it.
           // If so, selectedIndices.length won't match numSelected. Also check
           // that we're not displaying a message, which handles the case
-          // where we failed to summarize the selection and fell back to                  // displaying a message.
+          // where we failed to summarize the selection and fell back to
+          // displaying a message.
           if (gFolderDisplay.selectedIndices.length != numSelected &&
               command != "cmd_applyFiltersToSelection" &&
               gDBView && gDBView.currentlyDisplayedMessage == nsMsgViewIndex_None)
             return false;
           if (command == "cmd_reply" || command == "button_reply" ||
               command == "cmd_replyall" ||command == "button_replyall")
             return IsReplyEnabled();
           if (command == "cmd_replylist" || command == "button_replylist")
             return IsReplyListEnabled();
           return true;
         }
         return false;
-      case "cmd_print":
-        // We can print both a single message and a thread summary
-        return (GetNumSelectedMessages() > 0);
       case "cmd_printpreview":
-        if (!gMessageDisplay.singleMessageDisplay)
-          return false;
-        else if (GetNumSelectedMessages() == 1)
+        if (GetNumSelectedMessages() == 1)
           return gFolderDisplay.getCommandStatus(nsMsgViewCommandType.cmdRequiringMsgBody);
-        else
-          return false;
+        return false;
       case "cmd_printSetup":
       case "cmd_viewAllHeader":
       case "cmd_viewNormalHeader":
         return true;
       case "cmd_markAsFlagged":
       case "button_file":
 	return GetNumSelectedMessages() > 0;
       case "cmd_archive":
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -2220,22 +2220,18 @@ function PrintEnginePrintInternal(doPrin
   window.openDialog("chrome://messenger/content/msgPrintEngine.xul", "",
                     "chrome,dialog=no,all,centerscreen",
                     messageList.length, messageList, statusFeedback,
                     doPrintPreview, msgType, window);
 }
 
 function PrintEnginePrint()
 {
-  if (gMessageDisplay.singleMessageDisplay)
-    return PrintEnginePrintInternal(false,
-      Components.interfaces.nsIMsgPrintEngine.MNAB_PRINT_MSG);
-  else
-    return document.getElementById("multimessage")
-      .contentWindow.print();
+  return PrintEnginePrintInternal(false,
+    Components.interfaces.nsIMsgPrintEngine.MNAB_PRINT_MSG);
 }
 
 function PrintEnginePrintPreview()
 {
   return PrintEnginePrintInternal(true,
     Components.interfaces.nsIMsgPrintEngine.MNAB_PRINTPREVIEW_MSG);
 }