Closed
Bug 368233
Opened 18 years ago
Closed 18 years ago
The Account Wizard should support generic attributes from ISP RDF Files
Categories
(Thunderbird :: Account Manager, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird2.0
People
(Reporter: mscott, Assigned: mscott)
References
Details
(Keywords: fixed1.8.1.2)
Attachments
(1 file, 1 obsolete file)
5.51 KB,
patch
|
mscott
:
superreview+
mscott
:
approval-thunderbird2+
|
Details | Diff | Splinter Review |
Bug #368074 would allow ISPs to install anti-spam .sfd files along with their account configuration rdf files. As part of that bug, we want to let ISPs associate a spam server filter file with the account being created using the RDF file.
The spam settings use generic attributes on nsIMsgIncomingServer.
It would be useful if you could list attributes in an ISP RDF file for objects like the incoming server and the identity, and then if we are unable to assign the attribute into the actual server/identity object, we should fall back and try to set it as a generic attribute on the object instead.
Flags: blocking-thunderbird2+
Assignee | ||
Comment 1•18 years ago
|
||
Neil, what do you think of this approach for allowing generic incoming server and identity attributes to be set from ISP files.
Attachment #252835 -
Flags: superreview?(neil)
Comment 2•18 years ago
|
||
Comment on attachment 252835 [details] [diff] [review]
first cut at a patch
>+ dest.setCharAttribute(attribute, src[attribute]);
Since JS uses Unicode shouldn't this use setUnicharAttribute?
>+ // is there a way to detect if a setter for the attribute exists on dest
>+ // without relying on an exception?
if (dest.__lookupSetter__("attribute"))
(Unfortunately I think Components.lookupMethod only works on getters.)
>+ // if we are unable to set the attribute directly, consider falling back to
>+ // using the generic attribute setters
>+ setGeneric = useGenericFallback;
> }
>+
>+ // if we were unable to set the attribute, fall back to using a generic attribute setter
>+ if (setGeneric)
>+ setGenericAttribute(dest, src, attribute);
Instead of
var setGeneric = false;
try {
...
} catch (e) {
setGeneric = useGenericFallback;
}
if (setGeneric)
...
you might as well write
try {
...
} catch (e) {
if (setGeneric)
...
}
Attachment #252835 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 3•18 years ago
|
||
Thanks for the tip on using __lookupSetter__ Neil. That's what I was looking for.
Attachment #252835 -
Attachment is obsolete: true
Attachment #252952 -
Flags: superreview+
Attachment #252952 -
Flags: approval-thunderbird2+
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.2
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird2.0
You need to log in
before you can comment on or make changes to this bug.
Description
•