Closed
Bug 36480
Opened 25 years ago
Closed 24 years ago
Change sig if identity is changed
Categories
(MailNews Core :: Composition, defect, P3)
MailNews Core
Composition
Tracking
(Not tracked)
VERIFIED
FIXED
M18
People
(Reporter: BenB, Assigned: bugzilla)
References
Details
(Whiteboard: [nsbeta3+])
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Reproduce:
Use a profile with 2 sigs, which each have different signatures.
1. Reply or open a new msg
2. Select in the "From" box an identity with a different sig.
Actual result:
The signature in the content does not change.
Expected result:
The existant signature is replaced with the sig of the newly selected identity.
Proposed fix:
With bug 35158, you'll have a div, which surrounds the sig. Just remove it's
content and insert the new sig.
Be sure to use the same routinnses for the content creation, that are used to
create the initial sig (MsgCompose::ProcessSignature, I think).
Reporter | ||
Comment 3•25 years ago
|
||
alangho suggests in the dup bug, *not* to change the sig automatically, but add
new UI: a button to "repair" the sig, which appears, if identity and sig are
inconsistent. (Did I understand you correctly, or did you propose a dialog box?)
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Comment 4•25 years ago
|
||
See also bug 37644, `Show signature in collapsible pane for editing/switching'.
Summary: Change sig, if identity is changed → Change sig if identity is changed
I need to find out what else is not changed (wrong) when the user changes
identity? ie. does organization change, etc?
Suresh - can you try out for me?
Keywords: polish → correctness
Whiteboard: [nsbeta3+]
Assignee | ||
Comment 7•24 years ago
|
||
Normally, everything that are not editable in the compose window will be changed
as we don't cache them.
Assignee | ||
Comment 8•24 years ago
|
||
Ben, did you wrote some function to find the signature in a message body or
something like that?
These are the fields that should change when you change the identity.
Name, E-Mail, Reply-to, Organization, Signature.
Right now Name, E-mail and organization changes if you change the identity.
Reply-to and signature doesn't change.
Assignee | ||
Comment 10•24 years ago
|
||
Are you using a M18 build? if yes, reply-to should change now. Also, Bcc self
and bcc others change.
Comment 11•24 years ago
|
||
I tested on M17 builds.
Assignee | ||
Comment 12•24 years ago
|
||
Ok, that explains while reply-to wasn't changed.
Reporter | ||
Comment 13•24 years ago
|
||
ducarroz,
no function, but I added a "class=signature" (should actually be
"class=\"signature\"") to the wrapping element. You can search for that class*
in the DOM, remember its place, remove it, create a new signature using
|nsMsgCompose::ProcessSignature| (you may need to modify that function
slightly), and insert the result at the remembered place.
* Just search for the class, do *not* rely on the tag - currently a <div> - as
this will change. If the sig is plaintext, I will remove the <div> and add the
calss to the <pre>, which is there anyway. Even if the sig is HTML, the <div>
might be replaced with another tag.
Assignee | ||
Updated•24 years ago
|
Whiteboard: [nsbeta3+] → [nsbeta3+]Fix in hand
Assignee | ||
Comment 14•24 years ago
|
||
Fixed and checked in.
If you are not happy with the fact we switch the signature when you change the
identity, you can press undo twice to get back the previous signature.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta3+]Fix in hand → [nsbeta3+]
Reporter | ||
Comment 15•24 years ago
|
||
Thanks for fixing this bug!
But I found some problems with the implementation:
- The class will be quoted (e.g. |class="signature"|). Akk told me, I
have to explicitly check for that. I have two fixes: Either
- add |attributeValue.StripChars("\"");| or
- use |attributeValue.Find("signature", PR_TRUE) != kNotFound|
instead of |Equals...|
The latter still works, if there is more than one class, e.g.
|class="signature redness"|.
- You check for the existance of <div>. This doesn't work with my local
changes (which I intend to check in ASAP). Fixed this by simply removing the
check.
- If the user altered the sig, it will be removed nevertheless. This is
especially bad, as all text after the sig seems to be considered part of
it. Doesn't the editor insert a moz-dirty="true" attribute to changed
nodes? We could just check for that.
- The sig is not always found. Reproduce: Delete sig completely. From now on,
each identity change adds one sig (leaving the old one(s) as is). (As a user
might do this to reset a manually changed sig.)
Will attach patch for the first two problems.
Should I file new bugs or reopen?
Reporter | ||
Comment 16•24 years ago
|
||
Reporter | ||
Comment 17•24 years ago
|
||
Reporter | ||
Comment 18•24 years ago
|
||
ops, doublepost, sorry.
Assignee | ||
Comment 19•24 years ago
|
||
Ben, you patch is ok for me, R=ducarroz. Let me know when you check it in.
I reopen this bug and I will try to find a fix for problem 3 & 4
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
Reporter | ||
Comment 21•24 years ago
|
||
a=waterson. Will propably checkin tonight PDT.
Reporter | ||
Comment 22•24 years ago
|
||
checked in.
Assignee | ||
Comment 23•24 years ago
|
||
Ben,
about problem number 3: _moz_dirty is not used to mark a block as changed. I
think it has something to do with the refresh process. Therefore, I will not do
anything else to detect if yes or no the user has altered the current signature.
Anyway if it was the case and you switch identity, you can alway get back your
previous signature using undo (twice).
About problem 4, I wasn't able to reproduce it. I totally delete my signature
and I correctly get a new one when I swith identity. And if I switch it again,
the signature is correctly replaced.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 24•24 years ago
|
||
I verified the following in Win32 commercial build 2000-09-01-11-m18. Need to
still verify on Mac and Linux platforms.
Things verified:
1. I have a total of 4 accounts. Created a signature for mail account 1 and a
different signature for news account 2.
mail account 1 - sig file A
mail acounnt 2 - no sig file
news account 1 - no sig file
news account 2 - sig file B
2. When I create a new message from within each of the accounts, the proper
signature file shows up (if applicable)
3. When I create a new message from within one account, I change the From field
within the compose window. Each time, the proper signature file shows up (if
applicable) or the signature file gets removed.
QA Contact: lchiang → esther
Comment 25•24 years ago
|
||
Verified similar cases to lisa's comments with multiple accounts profile with
mail and news accounts .
OK using:
2000-09-20-08 commercial build linux rh6.0
2000-09-20-05 commercial build NT 4.0
2000-09-20-08 commercial build mac OS 9.0
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•