Bug 512828 - add a cmd_viewAllHeader and cmd_viewNormalHeader to the MessageWindowController. r=mkmelin
This commit is contained in:
Родитель
f5f16d1262
Коммит
94c1a3448f
|
@ -233,6 +233,8 @@ var DefaultController =
|
||||||
case "cmd_fullZoomEnlarge":
|
case "cmd_fullZoomEnlarge":
|
||||||
case "cmd_fullZoomReset":
|
case "cmd_fullZoomReset":
|
||||||
case "cmd_fullZoomToggle":
|
case "cmd_fullZoomToggle":
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
return true;
|
return true;
|
||||||
case "cmd_downloadFlagged":
|
case "cmd_downloadFlagged":
|
||||||
case "cmd_downloadSelected":
|
case "cmd_downloadSelected":
|
||||||
|
@ -347,6 +349,8 @@ var DefaultController =
|
||||||
return gFolderDisplay.getCommandStatus(nsMsgViewCommandType.cmdRequiringMsgBody);
|
return gFolderDisplay.getCommandStatus(nsMsgViewCommandType.cmdRequiringMsgBody);
|
||||||
return false;
|
return false;
|
||||||
case "cmd_printSetup":
|
case "cmd_printSetup":
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
return true;
|
return true;
|
||||||
case "cmd_markAsFlagged":
|
case "cmd_markAsFlagged":
|
||||||
case "button_file":
|
case "button_file":
|
||||||
|
@ -744,6 +748,12 @@ var DefaultController =
|
||||||
case "cmd_markAsFlagged":
|
case "cmd_markAsFlagged":
|
||||||
MsgMarkAsFlagged();
|
MsgMarkAsFlagged();
|
||||||
return;
|
return;
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
MsgViewAllHeaders();
|
||||||
|
return;
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
|
MsgViewNormalHeaders();
|
||||||
|
return;
|
||||||
case "cmd_markAsJunk":
|
case "cmd_markAsJunk":
|
||||||
JunkSelectedMessages(true);
|
JunkSelectedMessages(true);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -406,31 +406,13 @@ function initMoveToFolderAgainMenu(aMenuItem)
|
||||||
|
|
||||||
function InitViewHeadersMenu()
|
function InitViewHeadersMenu()
|
||||||
{
|
{
|
||||||
var headerchoice = 1;
|
const nsMimeHeaderDisplayTypes = Components.interfaces.nsMimeHeaderDisplayTypes;
|
||||||
try
|
var headerchoice = pref.getIntPref("mail.show_headers");
|
||||||
{
|
document.getElementById("cmd_viewAllHeader")
|
||||||
headerchoice = pref.getIntPref("mail.show_headers");
|
.setAttribute("checked", headerchoice == nsMimeHeaderDisplayTypes.AllHeaders);
|
||||||
}
|
document.getElementById("cmd_viewNormalHeader")
|
||||||
catch (ex)
|
.setAttribute("checked", headerchoice == nsMimeHeaderDisplayTypes.NormalHeaders);
|
||||||
{
|
document.commandDispatcher.updateCommands("create-menu-mark");
|
||||||
dump("failed to get the header pref\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
var id = null;
|
|
||||||
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 InitViewBodyMenu()
|
function InitViewBodyMenu()
|
||||||
|
|
|
@ -302,6 +302,8 @@
|
||||||
<command id="cmd_markAsJunk" oncommand="goDoCommand('cmd_markAsJunk'); event.stopPropagation()" disabled="true"/>
|
<command id="cmd_markAsJunk" oncommand="goDoCommand('cmd_markAsJunk'); event.stopPropagation()" disabled="true"/>
|
||||||
<command id="cmd_markAsNotJunk" oncommand="goDoCommand('cmd_markAsNotJunk'); event.stopPropagation()" disabled="true"/>
|
<command id="cmd_markAsNotJunk" oncommand="goDoCommand('cmd_markAsNotJunk'); event.stopPropagation()" disabled="true"/>
|
||||||
<command id="cmd_recalculateJunkScore" oncommand="goDoCommand('cmd_recalculateJunkScore');" disabled="true"/>
|
<command id="cmd_recalculateJunkScore" oncommand="goDoCommand('cmd_recalculateJunkScore');" disabled="true"/>
|
||||||
|
<command id="cmd_viewAllHeader" oncommand="goDoCommand('cmd_viewAllHeader');" disabled="true"/>
|
||||||
|
<command id="cmd_viewNormalHeader" oncommand="goDoCommand('cmd_viewNormalHeader');" disabled="true"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
|
|
||||||
<commandset id="mailToolsMenuItems"
|
<commandset id="mailToolsMenuItems"
|
||||||
|
@ -1119,13 +1121,13 @@
|
||||||
name="viewheadergroup"
|
name="viewheadergroup"
|
||||||
label="&headersAllCmd.label;"
|
label="&headersAllCmd.label;"
|
||||||
accesskey="&headersAllCmd.accesskey;"
|
accesskey="&headersAllCmd.accesskey;"
|
||||||
oncommand="MsgViewAllHeaders();"/>
|
command="cmd_viewAllHeader"/>
|
||||||
<menuitem id="viewnormalheaders"
|
<menuitem id="viewnormalheaders"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="viewheadergroup"
|
name="viewheadergroup"
|
||||||
label="&headersNormalCmd.label;"
|
label="&headersNormalCmd.label;"
|
||||||
accesskey="&headersNormalCmd.accesskey;"
|
accesskey="&headersNormalCmd.accesskey;"
|
||||||
oncommand="MsgViewNormalHeaders();"/>
|
command="cmd_viewNormalHeader"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
<menu id="viewBodyMenu" accesskey="&bodyMenu.accesskey;" label="&bodyMenu.label;">
|
<menu id="viewBodyMenu" accesskey="&bodyMenu.accesskey;" label="&bodyMenu.label;">
|
||||||
|
|
|
@ -763,6 +763,8 @@ var MessageWindowController =
|
||||||
case "cmd_fullZoomEnlarge":
|
case "cmd_fullZoomEnlarge":
|
||||||
case "cmd_fullZoomReset":
|
case "cmd_fullZoomReset":
|
||||||
case "cmd_fullZoomToggle":
|
case "cmd_fullZoomToggle":
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
return true;
|
return true;
|
||||||
case "cmd_synchronizeOffline":
|
case "cmd_synchronizeOffline":
|
||||||
case "cmd_downloadFlagged":
|
case "cmd_downloadFlagged":
|
||||||
|
@ -837,6 +839,8 @@ var MessageWindowController =
|
||||||
case "cmd_markAllRead":
|
case "cmd_markAllRead":
|
||||||
case "cmd_markThreadAsRead":
|
case "cmd_markThreadAsRead":
|
||||||
case "cmd_markReadByDate":
|
case "cmd_markReadByDate":
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
return(true);
|
return(true);
|
||||||
case "cmd_markAsFlagged":
|
case "cmd_markAsFlagged":
|
||||||
case "button_file":
|
case "button_file":
|
||||||
|
@ -1032,6 +1036,12 @@ var MessageWindowController =
|
||||||
case "cmd_markReadByDate":
|
case "cmd_markReadByDate":
|
||||||
MsgMarkReadByDate();
|
MsgMarkReadByDate();
|
||||||
return;
|
return;
|
||||||
|
case "cmd_viewAllHeader":
|
||||||
|
MsgViewAllHeaders();
|
||||||
|
return;
|
||||||
|
case "cmd_viewNormalHeader":
|
||||||
|
MsgViewNormalHeaders();
|
||||||
|
return;
|
||||||
case "cmd_markAsFlagged":
|
case "cmd_markAsFlagged":
|
||||||
MsgMarkAsFlagged();
|
MsgMarkAsFlagged();
|
||||||
return;
|
return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче