add option to use Received hdr for date, 166254, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2007-04-17 20:31:04 +00:00
Родитель 992a522017
Коммит 5d10b52ec2
3 изменённых файлов: 6 добавлений и 1 удалений

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

@ -476,6 +476,7 @@ nsParseMailMessageState::nsParseMailMessageState()
{
m_position = 0;
m_IgnoreXMozillaStatus = PR_FALSE;
m_useReceivedDate = PR_FALSE;
m_state = nsIMsgParseMailMsgState::ParseBodyState;
// setup handling of custom db headers, headers that are added to .msf files
@ -498,6 +499,7 @@ nsParseMailMessageState::nsParseMailMessageState()
if (!m_customDBHeaderValues)
m_customDBHeaders.Clear();
}
pPrefBranch->GetBoolPref("mailnews.use_received_date", &m_useReceivedDate);
}
Clear();
@ -1445,7 +1447,7 @@ int nsParseMailMessageState::FinalizeHeaders()
else if (inReplyTo != nsnull)
m_newMsgHdr->SetReferences(inReplyTo->value);
if (!LL_IS_ZERO(m_receivedTime))
if (!LL_IS_ZERO(m_receivedTime) && (!date || m_useReceivedDate))
m_newMsgHdr->SetDate(m_receivedTime);
else
{

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

@ -152,6 +152,7 @@ public:
PRUint16 m_body_lines;
PRBool m_IgnoreXMozillaStatus;
PRBool m_useReceivedDate;
// this enables extensions to add the values of particular headers to
// the .msf file as properties of nsIMsgHdr. It is initialized from a

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

@ -635,6 +635,8 @@ pref("mail.server.default.retainBy", 1);
pref("mailnews.ui.junk.firstuse", true);
pref("mailnews.ui.junk.manualMarkAsJunkMarksRead", true);
pref("mailnews.use_received_date", false);
// for manual upgrades of certain UI features.
// 1 -> 2 is for the folder pane tree landing, to hide the
// unread and total columns, see msgMail3PaneWindow.js