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
This commit is contained in:
mscott%netscape.com 2001-11-28 04:17:54 +00:00
Родитель 2d9af9f029
Коммит ee30eb36ed
3 изменённых файлов: 33 добавлений и 39 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -995,7 +995,7 @@ Rights Reserved.
</menupopup>
</menu>
<menu id="viewheadersmenu" label="&headersMenu.label;" accesskey="&headersMenu.accesskey;">
<menupopup>
<menupopup onpopupshowing="InitViewHeadersMenu();">
<menuitem id="viewallheaders"
type="radio"
name="viewheadergroup"

Просмотреть файл

@ -444,41 +444,6 @@ function OnLoadMessenger()
// FIX ME - later we will be able to use onload from the overlay
OnLoadMsgHeaderPane();
var id = null;
var headerchoice = null;
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 0:
id = "viewbriefheaders";
break;
case 1:
id = "viewnormalheaders";
break;
default:
id = "viewnormalheaders";
break;
}
var menuitem = document.getElementById(id);
try {
// not working right yet. see bug #??????
// menuitem.setAttribute("checked", "true");
}
catch (ex) {
dump("failed to set the view headers menu item\n");
}
gHaveLoadedMessage = false;
//Set focus to the Thread Pane the first time the window is opened.