Bug 1439172 - port bug 1427364: Auto-complete no longer supports showCommentColumn. r=aceman
authorJorg K <jorgk@jorgk.com>
Mon, 19 Feb 2018 21:50:01 +0100
changeset 31143 f51fea20a88c099624cc0145b4168b38eed204c8
parent 31142 b4e185898c1f1d24f762f7c11b3d5c7b37f57b58
child 31144 f4cf74a5c2e21df6fba6bcc2b81ec8ed26698099
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersaceman
bugs1439172, 1427364
Bug 1439172 - port bug 1427364: Auto-complete no longer supports showCommentColumn. r=aceman
mail/components/compose/content/MsgComposeCommands.js
mailnews/mailnews.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -5564,33 +5564,23 @@ function MakeFromFieldEditable(ignoreWar
   identityElement.value = identityElement.selectedItem.value;
   identityElement.select();
   identityElement.inputField.placeholder = getComposeBundle().getFormattedString("msgIdentityPlaceholder", [identityElement.selectedItem.value]);
 }
 
 function setupAutocomplete()
 {
   var autoCompleteWidget = document.getElementById("addressCol2#1");
-
-  // if the pref is set to turn on the comment column, honor it here.
-  // this element then gets cloned for subsequent rows, so they should
-  // honor it as well
-  //
-  try
-  {
+  try {
+    // Request that input that isn't matched be highlighted.
+    // This element then gets cloned for subsequent rows, so they should
+    // honor it as well.
     if (getPref("mail.autoComplete.highlightNonMatches"))
       autoCompleteWidget.highlightNonMatches = true;
-
-    if (getPref("mail.autoComplete.commentColumn"))
-      autoCompleteWidget.showCommentColumn = true;
-  } catch (ex)
-  {
-      // if we can't get this pref, then don't show the columns (which is
-      // what the XUL defaults to)
-  }
+  } catch (ex) {}
 }
 
 function fromKeyPress(event)
 {
   if (event.keyCode == KeyEvent.DOM_VK_RETURN)
     awSetFocus(1, awGetInputElement(1));
 }
 
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -567,18 +567,24 @@ pref("mailnews.traits.enabled.1", false)
 pref("mailnews.traits.id.2", "mailnews@mozilla.org#junk");
 pref("mailnews.traits.name.2", "Junk");
 pref("mailnews.traits.enabled.2", true);
 pref("mailnews.traits.antiId.2", "mailnews@mozilla.org#good");
 // traits 3 - 1000 are reserved for use by mailnews@mozilla.org
 // the first externally defined trait will have index 1001
 pref("mailnews.traits.lastIndex", 1000);
 
+// Adress entry will highlight input that doesn't match anything in the
+// address books.
 pref("mail.autoComplete.highlightNonMatches", true);
 
+// Show extra column in address entry. This is numeric for
+// historical reasons: 0 = no extra column, 1 = show extra column.
+pref("mail.autoComplete.commentColumn", 0);
+
 // if true, we'll use the password from an incoming server with
 // matching username and domain
 pref("mail.smtp.useMatchingDomainServer", false);
 
 // if true, we'll use the password from an incoming server with
 // matching username and host name
 pref("mail.smtp.useMatchingHostNameServer", false);