fix 93453 sr=mscott a=asa, stop email autocomplete from adding users domain by default, add option to show non-matched addresses in red

This commit is contained in:
bienvenu%nventure.com 2005-05-07 15:49:05 +00:00
Родитель e5c4e62d16
Коммит 46d626136f
4 изменённых файлов: 23 добавлений и 3 удалений

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

@ -49,7 +49,7 @@
*/
[scriptable, uuid(D3B4A420-D5AC-11d2-806A-006008128C4E)]
[scriptable, uuid(2b165a14-1ac1-4c32-8cc5-72e2937d5be9)]
interface nsIMsgIdentity : nsISupports {
/* internal preferences ID */
attribute string key;
@ -121,6 +121,11 @@ interface nsIMsgIdentity : nsISupports {
attribute boolean showSaveMsgDlg;
attribute string directoryServer;
attribute boolean overrideGlobalPref;
/**
* If this is false, don't append the user's domain
* to an autocomplete address with no matches
*/
attribute boolean autocompleteToMyDomain;
/**
* valid determines if the UI should use this identity
* and the wizard uses this to determine whether or not

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

@ -573,6 +573,7 @@ NS_IMPL_FOLDERPREF_STR (StationeryFolder, "stationery_folder")
NS_IMPL_IDPREF_BOOL(ShowSaveMsgDlg, "showSaveMsgDlg")
NS_IMPL_IDPREF_STR (DirectoryServer, "directoryServer")
NS_IMPL_IDPREF_BOOL(OverrideGlobalPref, "overrideGlobal_Pref")
NS_IMPL_IDPREF_BOOL(AutocompleteToMyDomain, "autocompleteToMyDomain");
NS_IMPL_IDPREF_BOOL(Valid, "valid")

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

@ -326,7 +326,7 @@ pref("mail.identity.default.compose_html", true);
pref("mail.identity.default.valid", true);
pref("mail.identity.default.fcc",true);
pref("mail.identity.default.fcc_folder","mailbox://nobody@Local%20Folders/Sent");
pref("mail.identity.default.autocompleteToMyDomain", false);
// keep these defaults for backwards compatibility and migration
@ -424,6 +424,8 @@ pref("mail.server.default.manualMarkMode",0); // 0 == "move to junk folder", 1 =
// by changing this pref. Typical values are .99, .95, .90, .5, etc.
pref("mail.adaptivefilters.junk_threshold", 90);
pref("mail.autoComplete.highlightNonMatches", true);
// if true, we'll use the password from an incoming server with
// matching username and domain
pref("mail.smtp.useMatchingDomainServer", false);

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

@ -136,7 +136,13 @@
<property name="autoFillAfterMatch"
onset="this.setAttribute('autoFillAfterMatch', val); return val;"
onget="return this.getAttribute('autoFillAfterMatch') == 'true';"/>
<!-- if this attribute is set, allow different style for
non auto-completed lines -->
<property name="highlightNonMatches"
onset="this.setAttribute('highlightNonMatches', val); return val;"
onget="return this.getAttribute('highlightNonMatches') == 'true';"/>
<!-- toggles a second column in the results list which contains
the string in the comment field of each autocomplete result -->
<property name="showCommentColumn"
@ -528,6 +534,7 @@
this.mFailureCount = 0;
this.mFailureItems = 0;
this.mDefaultMatchFilled = false; // clear out our prefill state.
this.removeAttribute("noMatchesFound");
// tell each session to start searching...
for (var name in this.mSessions)
@ -664,6 +671,9 @@
else
this.removeAttribute("nomatch");
if (!this.mDefaultMatchFilled && this.highlightNonMatches)
this.setAttribute("noMatchesFound", true);
// if we have processed all of our searches, and none of them gave us a default index,
// then we should try to auto fill the input field with the first match.
// note: autoFillInput is smart enough to kick out if we've already prefilled something...
@ -731,6 +741,7 @@
}
this.mNeedToComplete = false;
this.removeAttribute("noMatchesFound");
this.clearTimer();
if (aFireTextCommand)
@ -831,6 +842,7 @@
var str = this.value;
this.currentSearchString = str;
this.resultsPopup.selectedIndex = null;
this.removeAttribute("noMatchesFound");
// We want to autocomplete only if the user is editing at the end of the text
if (this.mInputElt.selectionEnd >= str.length)