зеркало из https://github.com/mozilla/pjs.git
Bug #145798 --> Create Filter from Message is not doable when message pane is closed.
Porting to thunderbird patch by mcow
This commit is contained in:
Родитель
d38de0868d
Коммит
dc68e1d0a6
|
@ -259,17 +259,14 @@ var DefaultController =
|
|||
gDBView.getCommandStatus(nsMsgViewCommandType.toggleThreadWatched, enabled, checkStatus);
|
||||
return enabled.value;
|
||||
case "cmd_createFilterFromPopup":
|
||||
case "cmd_createFilterFromMenu":
|
||||
var loadedFolder = GetLoadedMsgFolder();
|
||||
if (!(loadedFolder && loadedFolder.server.canHaveFilters))
|
||||
return false;
|
||||
case "cmd_createFilterFromMenu":
|
||||
loadedFolder = GetLoadedMsgFolder();
|
||||
if (!(loadedFolder && loadedFolder.server.canHaveFilters) || !(IsMessageDisplayedInMessagePane()))
|
||||
return false;
|
||||
return false; // else fall thru
|
||||
case "cmd_saveAsFile":
|
||||
case "cmd_saveAsTemplate":
|
||||
if (GetNumSelectedMessages() > 1)
|
||||
return false;
|
||||
return false; // else fall thru
|
||||
case "cmd_reply":
|
||||
case "button_reply":
|
||||
case "cmd_replySender":
|
||||
|
|
|
@ -1004,21 +1004,15 @@ function MsgEditMessageAsNew()
|
|||
|
||||
function MsgCreateFilter()
|
||||
{
|
||||
var emailAddressNode;
|
||||
// retrieve Sender direct from selected message's headers
|
||||
var msgHdr = gDBView.hdrForFirstSelectedMessage;
|
||||
var headerParser = Components.classes["@mozilla.org/messenger/headerparser;1"].getService(Components.interfaces.nsIMsgHeaderParser);
|
||||
var emailAddress = headerParser.extractHeaderAddressMailboxes(null, msgHdr.author);
|
||||
|
||||
if (gCollapsedHeaderViewMode)
|
||||
emailAddressNode = document.getElementById("collapsedfromValue");
|
||||
else
|
||||
emailAddressNode = document.getElementById("expandedfromBox").emailAddressNode;
|
||||
|
||||
if (emailAddressNode)
|
||||
{
|
||||
var emailAddress = emailAddressNode.getTextAttribute("emailAddress");
|
||||
if (emailAddress){
|
||||
if (emailAddress)
|
||||
top.MsgFilters(emailAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function MsgHome(url)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче