Bug 1140368 - properly initialize "View attachments inline" menuitem also in the appmenu. r=mkmelin
authoraceman <acelists@atlas.sk>
Thu, 12 Mar 2015 10:25:33 +0100
changeset 28673 edafc098a2a36540f08f96b9e24d2c27cd4b769e
parent 28670 d1ca2cc2bd7e42619264362461deb766c9f511f3
child 28674 10ae8ea49f4ea4f828600b99e024b39a16dd3b4e
push id2273
push userclokep@gmail.com
push dateThu, 12 Mar 2015 15:28:42 +0000
treeherdertry-comm-central@ebf84511166e [default view] [failures only]
reviewersmkmelin
bugs1140368
Bug 1140368 - properly initialize "View attachments inline" menuitem also in the appmenu. r=mkmelin
mail/base/content/mailWindowOverlay.js
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -251,16 +251,21 @@ function view_init()
             .setAttribute("checked", index == checked);
   }
 
   // Initialize the View Attachment Inline menu
   var viewAttachmentInline = Services.prefs.getBoolPref("mail.inline_attachments");
   document.getElementById("viewAttachmentsInlineMenuitem")
           .setAttribute("checked", viewAttachmentInline);
 
+  let viewAttachmentInlineMenu =
+    document.getElementById("appmenu_viewAttachmentsInlineMenuitem");
+  if (viewAttachmentInlineMenu)
+    viewAttachmentInlineMenu.setAttribute("checked", viewAttachmentInline);
+
   document.commandDispatcher.updateCommands('create-menu-view');
 
   // Disable the charset item if there's nothing to enable
   document.getElementById("charsetMenu")
           .setAttribute("disabled", !msgWindow.mailCharacterSet);
   let appmenuCharset = document.getElementById("appmenu_charsetMenu");
   if (appmenuCharset)
     appmenuCharset.setAttribute("disabled", !msgWindow.mailCharacterSet);