From ee30eb36ed1093d1cb7978cfe4b84a641460ad5c Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 28 Nov 2001 04:17:54 +0000 Subject: [PATCH] Bug #112324 --> don't initialize the view header menu item in the onload handler for the mail 3-pane. This helps start up time in a very small way. r=bienvenu rs=sspitzer --- .../resources/content/mailWindowOverlay.js | 29 +++++++++++++ .../resources/content/mailWindowOverlay.xul | 2 +- .../resources/content/msgMail3PaneWindow.js | 41 ++----------------- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/mailnews/base/resources/content/mailWindowOverlay.js b/mailnews/base/resources/content/mailWindowOverlay.js index f1e1fa50d7ad..a9a7ea171e7c 100644 --- a/mailnews/base/resources/content/mailWindowOverlay.js +++ b/mailnews/base/resources/content/mailWindowOverlay.js @@ -257,6 +257,35 @@ function InitMessageMenu() document.commandDispatcher.updateCommands('create-menu-message'); } +function InitViewHeadersMenu() +{ + var id = null; + var headerchoice = 1; + try + { + headerchoice = pref.getIntPref("mail.show_headers"); + } + catch (ex) + { + dump("failed to get the header pref\n"); + } + + switch (headerchoice) + { + case 2: + id = "viewallheaders"; + break; + case 1: + default: + id = "viewnormalheaders"; + break; + } + + var menuitem = document.getElementById(id); + if (menuitem) + menuitem.setAttribute("checked", "true"); +} + function IsNewsMessage(messageUri) { if (!messageUri) return false; diff --git a/mailnews/base/resources/content/mailWindowOverlay.xul b/mailnews/base/resources/content/mailWindowOverlay.xul index d0588d14557f..6c93fa125430 100644 --- a/mailnews/base/resources/content/mailWindowOverlay.xul +++ b/mailnews/base/resources/content/mailWindowOverlay.xul @@ -995,7 +995,7 @@ Rights Reserved. - +