do away with preprocessing in am-identity-edit.js due to identity.autocompleteToMyDomain

RESOLVED FIXED in Thunderbird 40.0

Status

MailNews Core
Account Manager
--
trivial
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

Trunk
Thunderbird 40.0

Thunderbird Tracking Flags

(thunderbird40 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

5.46 KB, patch
aceman
: review+
Details | Diff | Splinter Review
(Assignee)

Description

3 years ago
In mailnews/prefs/content/am-identity-edit.js we have:

#ifndef MOZ_THUNDERBIRD
  document.getElementById('identity.autocompleteToMyDomain').checked = addressingIdentity.autocompleteToMyDomain;
#endif

I think we can solve this also without preprocessing the file as we can 
check for the existence of the element. It is already ifndef-ed out in am-addressingOverlay.xul .

This should have no functional effects (aside from negligible runtime regression) but should increase productivity of developers working in that file.
(Assignee)

Comment 1

3 years ago
Created attachment 8591238 [details] [diff] [review]
patch
Attachment #8591238 - Flags: review?(mkmelin+mozilla)
Attachment #8591238 - Flags: review?(iann_bugzilla)

Updated

3 years ago
Attachment #8591238 - Flags: review?(mkmelin+mozilla) → review+

Comment 2

3 years ago
Comment on attachment 8591238 [details] [diff] [review]
patch

>+++ b/mailnews/base/prefs/content/am-identity-edit.js
>+  let autoCompleteElement = document.getElementById('identity.autocompleteToMyDomain');
>+  if (autoCompleteElement) // Thunderbird does not have this element
Nit: Missing . at the end of the comment?
>+    autoCompleteElement.checked = addressingIdentity.autocompleteToMyDomain;

>+  let autoCompleteElement = document.getElementById('identity.autocompleteToMyDomain');
>+  if (autoCompleteElement) // Thunderbird does not have this element
Nit: Missing . at the end of the comment?
>+    identity.autocompleteToMyDomain = autoCompleteElement.checked;
r=me with that sorted.
Attachment #8591238 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Comment 3

3 years ago
Created attachment 8591910 [details] [diff] [review]
patch v1.1

Thanks.
Attachment #8591238 - Attachment is obsolete: true
Attachment #8591910 - Flags: review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/f35356b9cce6
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → ---
status-thunderbird40: --- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
You need to log in before you can comment on or make changes to this bug.