if "mail.forward_message_mode" is 1, the pref panel shows "0", but the back end does "2"



MailNews: Message Display
17 years ago
13 years ago


(Reporter: (not reading, please use seth@sspitzer.org instead), Assigned: Cavin Song)


Firefox Tracking Flags

(Not tracked)



(5 attachments)

two problems:

1) in 6.x, "mail.forward_message_mode" can only be 0 or 2.  (1 is obsolete)  
but if you migrated from 4.x, it looks like we don't convert it to 0 or 2 (if it
was 1).  this caused an JS exception in nsWidgetStateManager.js

2) nsWidgetStateManager.js can be made more robust.  here comes a patch for

this problem can be generalized to any menulist / pref.  if the value isn't one
of the options in the menulist, we barf.
Created attachment 29215 [details] [diff] [review]
make the .js more robust
fix summary.
Summary: if "mail.forward_message_mode" is 2, message compose pref panel is horked → if "mail.forward_message_mode" is 1, message compose pref panel is horked

Comment 3

17 years ago
of, the widget state manager is more robust.

no more horkage.

Comment 5

17 years ago
I think there's an old rusty bug about this migrated state from early 6.0 days.
 It's probably very confusing by now,so if I find it I'll mark it a duplicate of
this one.
QA Contact: esther → sheelar

Comment 6

17 years ago
The bug I was thinking of is bug 21219, which has an awful lot of commentary and
changed a bit over time.  I'll just refer to it here and let someone else decide
on what to do with it.
QA Contact: sheelar → laurel

Comment 7

17 years ago
Created attachment 29478 [details] [diff] [review]
Convert 1 to 0 in 6.x for forward_message_mode option
is that correct?

looking at MsgForwardMessage() in mailWindowOverlay.js, we treat 1 as "forward
as inline"

it might be that the pref UI shows 1 as 0, but the code treats 1 as 2.

please confirm

the horked problem is fixed.

updating summary to reflect the remaining issue.

the proper fix is to fix the "back end" (mailWindowOverlay.js) to treat any
value other than 2 as 0.  the reason is the widget manager will show "0" in the
pref ui (since it is the first item in the menu list) if the value is anything
other that "0" or "2".

our pref ui should reflect what the back end will do when you reply / forward.

cavin, please update your fix to include the fix to mailWindowOverlay.js
Summary: if "mail.forward_message_mode" is 1, message compose pref panel is horked → if "mail.forward_message_mode" is 1, the pref panel shows "0", but the back end does "2"

Comment 10

17 years ago
Created attachment 29547 [details] [diff] [review]
Fixed "backend" to map 1 to 0
Created attachment 29577 [details] [diff] [review]
patch based on cavin's patch, with comments.
the patch looks good, but let's think about this.

we are mapping "forward quoted" to "forward as attachment".

it seems that "forward inline" is closer to "forward quoted" than "forward as

we should still keep the UI and the back end in sync, but perhaps we should go
the other way and map 1 to 2, instead of 0.

to do this, we'd keep the old logic in mailWindowOverlay.js, and reverse the
order of the menuitems in pref-composing_messages.xul

if we want to map 1 -> 0, cavin's patch is correct.

if we want to map 1 -> 2, it's not.


Comment 13

17 years ago
Created attachment 29864 [details] [diff] [review]
Mapp 1 to 2 (inline)
fix checked in.

thanks cavin!
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 15

17 years ago
*** Bug 21219 has been marked as a duplicate of this bug. ***

Comment 16

17 years ago
OK using apr 18 commercial trunk build: linux rh6.2, mac OS 9.0 and win98.
1/quoted gets mapped to inline.
*** Bug 23098 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.