зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2d9af9f029
Коммит
ee30eb36ed
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче