Bug33543 Addresses from reading a newsgroup posting shouldn't be added to collected addresses, r=sspitzer, sr=bienvenu

This commit is contained in:
chuang%netscape.com 2001-01-18 05:47:38 +00:00
Родитель 77e9e1de2b
Коммит 6cac2a24fc
3 изменённых файлов: 19 добавлений и 8 удалений

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

@ -12,7 +12,7 @@
<script language="javascript">
<![CDATA[
var _elementIDs = ["emailCollection", "emailCollectionIncoming", "emailCollectionOutgoing", "addressingAutocomplete", "enableCABsizeLimit", "CABsizeLimit"];
var _elementIDs = ["emailCollection", "emailCollectionIncoming", "emailCollectionOutgoing", "emailCollectionNewsgroup", "addressingAutocomplete", "enableCABsizeLimit", "CABsizeLimit"];
]]>
function Startup(){
@ -24,6 +24,7 @@
var emailCollection = document.getElementById("emailCollection");
var emailCollectionIncoming = document.getElementById("emailCollectionIncoming");
var emailCollectionOutgoing = document.getElementById("emailCollectionOutgoing");
var emailCollectionNewsgroup = document.getElementById("emailCollectionNewsgroup");
var emailCollectionTypeText = document.getElementById("emailCollectionTypeText");
var enableCABsizeLimit = document.getElementById("enableCABsizeLimit");
var CABsizeLimit = document.getElementById("CABsizeLimit");
@ -32,6 +33,7 @@
if( emailCollection.checked ){
emailCollectionIncoming.removeAttribute("disabled");
emailCollectionOutgoing.removeAttribute("disabled");
emailCollectionNewsgroup.removeAttribute("disabled");
emailCollectionTypeText.removeAttribute("disabled");
enableCABsizeLimit.removeAttribute("disabled");
CABsizeLimit.removeAttribute("disabled");
@ -39,6 +41,7 @@
} else {
emailCollectionIncoming.setAttribute("disabled", "true");
emailCollectionOutgoing.setAttribute("disabled", "true");
emailCollectionNewsgroup.setAttribute("disabled", "true");
emailCollectionTypeText.setAttribute("disabled", "true");
enableCABsizeLimit.setAttribute("disabled", "true");
CABsizeLimit.setAttribute("disabled", "true");
@ -63,6 +66,9 @@
prefattribute="checked"/>
<checkbox id="emailCollectionOutgoing" value="&emailCollectionOutgoingEnable.label;"
pref="true" preftype="bool" prefstring="mail.collect_email_address_outgoing"
prefattribute="checked"/>
<checkbox id="emailCollectionNewsgroup" value="&emailCollectionNewsgroupEnable.label;"
pref="true" preftype="bool" prefstring="mail.collect_email_address_newsgroup"
prefattribute="checked"/>
<box autostretch="never">
<checkbox id="enableCABsizeLimit" value="&useCABSizelimitPart1.label;"

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

@ -36,11 +36,12 @@ Rights Reserved.
<!ENTITY useAddress.label "Use the address and do not search in the directory">
<!ENTITY useAddress.accesskey "u">
<!ENTITY emailCollectionEnable.label "Enable Email Address Collection">
<!ENTITY emailCollectionIncomingEnable.label "Incoming Messages">
<!ENTITY emailCollectionOutgoingEnable.label "Outgoing Messages">
<!ENTITY emailCollectionTypeText.label "Save email addresses from my:">
<!ENTITY emailCollectionIncomingEnable.label "Incoming Mail Messages">
<!ENTITY emailCollectionOutgoingEnable.label "Outgoing Mail Messages">
<!ENTITY emailCollectionNewsgroupEnable.label "Newsgroup Messages">
<!ENTITY emailCollectionTypeText.label "Save email addresses from:">
<!ENTITY emailCollectiontitle.label "Email Address Collection">
<!ENTITY emailCollectiontext.label "Email Address Collection saves the email addresses from your incoming and/or outgoing mail and stores them in a local address book, 'Collected Addresses'.">
<!ENTITY emailCollectiontext.label "Email Address Collection saves the email addresses from your incoming and/or outgoing messages and stores them in a local address book, 'Collected Addresses'.">
<!ENTITY useCABSizelimitPart1.label "Limit the Collected Address book to">
<!ENTITY useCABSizelimitPart2.label "cards.">

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

@ -44,6 +44,8 @@ var gGeneratedViewAllHeaderInfo = false;
var gViewAllHeaders = false;
var gNumAddressesToShow = 3;
var gShowUserAgent = false;
var gCollectIncoming = false;
var gCollectNewsgroup = false;
// attachments array
var attachmentUrlArray = new Array();
@ -125,6 +127,8 @@ function OnLoadMsgHeaderPane()
// displaying a message...
gNumAddressesToShow = pref.GetIntPref("mailnews.max_header_display_length");
gShowUserAgent = pref.GetBoolPref("mailnews.headers.showUserAgent");
gCollectIncoming = pref.GetBoolPref("mail.collect_email_address_incoming");
gCollectNewsgroup = pref.GetBoolPref("mail.collect_email_address_newsgroup");
}
// The messageHeaderSink is the class that gets notified of a message's headers as we display the message
@ -173,7 +177,7 @@ var messageHeaderSink = {
UpdateMessageHeaders();
},
handleHeader: function(headerName, headerValue)
handleHeader: function(headerName, headerValue, dontCollectAddress)
{
// WARNING: if you are modifying this function, make sure you do not do *ANY*
// dom manipulations which would trigger a reflow. This method gets called
@ -191,8 +195,8 @@ var messageHeaderSink = {
currentHeaderData[lowerCaseHeaderName] = foo;
if (lowerCaseHeaderName == "from")
{
var collectIncoming = pref.GetBoolPref("mail.collect_email_address_incoming");
if (collectIncoming && headerValue && abAddressCollector)
if (headerValue && abAddressCollector &&
((gCollectIncoming && !dontCollectAddress) || (gCollectNewsgroup && dontCollectAddress)))
abAddressCollector.collectUnicodeAddress(headerValue);
}