Bug 195315 Run Junk Mail Controls on selected messages r=mscott sr=bienvenu

This commit is contained in:
neil%parkwaycc.co.uk 2004-02-20 21:13:24 +00:00
Родитель 14c74c41d8
Коммит ea8f6a9160
4 изменённых файлов: 23 добавлений и 1 удалений

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

@ -197,6 +197,7 @@ var DefaultController =
case "cmd_markAsFlagged":
case "cmd_markAsJunk":
case "cmd_markAsNotJunk":
case "cmd_recalculateJunkScore":
case "cmd_applyFilters":
case "cmd_runJunkControls":
case "cmd_deleteJunk":
@ -315,6 +316,7 @@ var DefaultController =
return (GetNumSelectedMessages() > 0 );
case "cmd_markAsJunk":
case "cmd_markAsNotJunk":
case "cmd_recalculateJunkScore":
// can't do news on junk yet.
return (GetNumSelectedMessages() > 0 && !isNewsURI(GetFirstSelectedMessage()));
case "cmd_applyFilters":
@ -615,6 +617,9 @@ var DefaultController =
case "cmd_markAsNotJunk":
JunkSelectedMessages(false);
return;
case "cmd_recalculateJunkScore":
analyzeMessagesForJunk();
return;
case "cmd_applyFilters":
MsgApplyFilters(null);
return;

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

@ -258,6 +258,7 @@ Rights Reserved.
<command id="cmd_markAsFlagged" oncommand="goDoCommand('cmd_markAsFlagged'); event.preventBubble()" disabled="true"/>
<command id="cmd_markAsJunk" oncommand="goDoCommand('cmd_markAsJunk'); event.preventBubble()" disabled="true"/>
<command id="cmd_markAsNotJunk" oncommand="goDoCommand('cmd_markAsNotJunk'); event.preventBubble()" disabled="true"/>
<command id="cmd_recalculateJunkScore" oncommand="goDoCommand('cmd_recalculateJunkScore');" disabled="true"/>
</commandset>
<commandset id="mailLabelMenuItems"
@ -604,6 +605,9 @@ Rights Reserved.
<menuitem label="&markAsNotJunkCmd.label;"
accesskey="&markAsNotJunkCmd.accesskey;"
observes="cmd_markAsNotJunk"/>
<menuitem label="&recalculateJunkScoreCmd.label;"
accesskey="&recalculateJunkScoreCmd.accesskey;"
command="cmd_recalculateJunkScore"/>
</menupopup>
</menu>
<menuseparator/>
@ -942,6 +946,9 @@ Rights Reserved.
<menuitem label="&markAsNotJunkCmd.label;"
accesskey="&markAsNotJunkCmd.accesskey;"
observes="cmd_markAsNotJunk"/>
<menuitem label="&recalculateJunkScoreCmd.label;"
accesskey="&recalculateJunkScoreCmd.accesskey;"
command="cmd_recalculateJunkScore"/>
</menupopup>
</menu>
<menuseparator id="messagePaneContext-sep-labels-2"/>
@ -1536,6 +1543,9 @@ Rights Reserved.
key="key_markNotJunk"
accesskey="&markAsNotJunkCmd.accesskey;"
observes="cmd_markAsNotJunk"/>
<menuitem label="&recalculateJunkScoreCmd.label;"
accesskey="&recalculateJunkScoreCmd.accesskey;"
command="cmd_recalculateJunkScore"/>
</menupopup>
</menu>
<menuseparator/>

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

@ -718,6 +718,7 @@ var MessageWindowController =
case "cmd_file":
case "cmd_markAsJunk":
case "cmd_markAsNotJunk":
case "cmd_recalculateJunkScore":
case "cmd_applyFilters":
case "cmd_runJunkControls":
case "cmd_deleteJunk":
@ -777,6 +778,7 @@ var MessageWindowController =
// fall through
case "cmd_markAsJunk":
case "cmd_markAsNotJunk":
case "cmd_recalculateJunkScore":
// can't do junk on news yet
return (!isNewsURI(gCurrentFolderUri));
case "cmd_reply":
@ -980,6 +982,9 @@ var MessageWindowController =
case "cmd_markAsNotJunk":
JunkSelectedMessages(false);
return;
case "cmd_recalculateJunkScore":
analyzeMessagesForJunk();
return;
case "cmd_label0":
gDBView.doCommand(nsMsgViewCommandType.label0);
return;
@ -1094,4 +1099,4 @@ function LoadMessageByMsgKey(messageKey)
}
else
gDBView.loadMessageByMsgKey(messageKey);
}
}

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

@ -399,6 +399,8 @@ Rights Reserved.
<!ENTITY markAsNotJunkCmd.label "As Not Junk">
<!ENTITY markAsNotJunkCmd.accesskey "N">
<!ENTITY markAsNotJunkCmd.key "j">
<!ENTITY recalculateJunkScoreCmd.label "Run Junk Mail Controls">
<!ENTITY recalculateJunkScoreCmd.accesskey "C">
<!ENTITY openMessageWindowCmd.label "Open Message">
<!ENTITY openMessageWindowCmd.accesskey "O">
<!ENTITY openMessageWindowCmd.key "o">