mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
31438: stealth msg compose (r=ducarroz)
This commit is contained in:
parent
8f13e2f0b2
commit
1e8b1a7614
@ -450,18 +450,27 @@ function MsgDeleteFolder()
|
||||
|
||||
function MsgNewMessage(event)
|
||||
{
|
||||
if (event.shiftKey)
|
||||
ComposeMessage(msgComposeType.New, msgComposeFormat.OppositeOfDefault);
|
||||
else
|
||||
ComposeMessage(msgComposeType.New, msgComposeFormat.Default);
|
||||
}
|
||||
|
||||
function MsgReplyMessage(event)
|
||||
{
|
||||
dump("\nMsgReplyMessage from XUL\n");
|
||||
if (event.shiftKey)
|
||||
ComposeMessage(msgComposeType.Reply, msgComposeFormat.OppositeOfDefault);
|
||||
else
|
||||
ComposeMessage(msgComposeType.Reply, msgComposeFormat.Default);
|
||||
}
|
||||
|
||||
function MsgReplyToAllMessage(event)
|
||||
{
|
||||
dump("\nMsgReplyToAllMessage from XUL\n");
|
||||
if (event.shiftKey)
|
||||
ComposeMessage(msgComposeType.ReplyAll, msgComposeFormat.OppositeOfDefault);
|
||||
else
|
||||
ComposeMessage(msgComposeType.ReplyAll, msgComposeFormat.Default);
|
||||
}
|
||||
|
||||
@ -482,12 +491,20 @@ function MsgForwardMessage(event)
|
||||
function MsgForwardAsAttachment(event)
|
||||
{
|
||||
dump("\nMsgForwardAsAttachment from XUL\n");
|
||||
if (event.shiftKey)
|
||||
ComposeMessage(msgComposeType.ForwardAsAttachment,
|
||||
msgComposeFormat.OppositeOfDefault);
|
||||
else
|
||||
ComposeMessage(msgComposeType.ForwardAsAttachment, msgComposeFormat.Default);
|
||||
}
|
||||
|
||||
function MsgForwardAsInline(event)
|
||||
{
|
||||
dump("\nMsgForwardAsInline from XUL\n");
|
||||
if (event.shiftKey)
|
||||
ComposeMessage(msgComposeType.ForwardInline,
|
||||
msgComposeFormat.OppositeOfDefault);
|
||||
else
|
||||
ComposeMessage(msgComposeType.ForwardInline, msgComposeFormat.Default);
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ interface nsIMsgCompFormat {
|
||||
const long Default = 0;
|
||||
const long HTML = 1;
|
||||
const long PlainText = 2;
|
||||
const long OppositeOfDefault = 3;
|
||||
};
|
||||
|
||||
typedef long MSG_ComposeSaveType;
|
||||
|
@ -400,6 +400,12 @@ nsresult nsMsgCompose::Initialize(nsIDOMWindow *aWindow,
|
||||
{
|
||||
case nsIMsgCompFormat::HTML : m_composeHTML = PR_TRUE; break;
|
||||
case nsIMsgCompFormat::PlainText : m_composeHTML = PR_FALSE; break;
|
||||
case nsIMsgCompFormat::OppositeOfDefault:
|
||||
/* ask the identity which compose to use */
|
||||
if (m_identity) m_identity->GetComposeHtml(&m_composeHTML);
|
||||
/* then use the opposite */
|
||||
m_composeHTML = !m_composeHTML;
|
||||
break;
|
||||
default :
|
||||
/* ask the identity which compose to use */
|
||||
if (m_identity) m_identity->GetComposeHtml(&m_composeHTML);
|
||||
|
Loading…
x
Reference in New Issue
Block a user