Closed Bug 80194 Opened 23 years ago Closed 23 years ago

offline: Radio buttons for 'When it is time to clean up messages' are not initially set

Categories

(SeaMonkey :: MailNews: Backend, defect, P2)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: grylchan, Assigned: dianesun)

References

Details

(Whiteboard: [PDT+] Request R&SR)

Attachments

(3 files)

2001050804 Windows and 2001050808 Mac commericial builds (didn't try linux)

Problem:
 When a news server is first added, no default preference is set for
 'When it is time to clean up messages'. Once you select one of the
 3 choices, you are then forced to always pick one and there by 
 confusing the user who initially had this option of not picking any
 of them.

Steps to Reproduce:
1) Go to Mail&News account settings
2) Click on Offline&Disk Space pref for a News account
3) Notice the pref 'When it is time to clean up messages'
   and the 3 radio buttons for the 3 choices:
        -Keep messages which have arrived within past X days         
        -Keep all messages
        -Keep the newest X messages
4) all 3 radio buttons are unselected

Actual Results: None of the 3 choices are selected and once the user makes
   a selection, the user is forced to always pick one of them. The user can
   no longer go back to the state of not selecting any of them.

Expected Results: The user shouldn't ever have the choice of not selecting
   any of them. It should default to one of those 3 choices. In 4.x, it
   defaults to 'Keep all messages'.
QA Contact: esther → gchan
In my own build, it has the default choice  "Keep all messages". Will check it 
out why not in truck build.
Target Milestone: --- → mozilla0.9.1
Priority: -- → P2
Looks like the fall back if there are no retainByPreference, is to have 
keepAllMsg set to true.

    else 
        document.getElementById("nntp.keepAllMsg").checked = true;

I think a switch statement will serve you best here in combining several 
cases to care of options and defaults appropriately.

Setting target milestone to 0.9.2 (check it in anytime, even before, when the
tree is open for). Per PDT triage.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Status: NEW → ASSIGNED
Whiteboard: Request R&SR
r=bhuvan.
PDT+ per 6/12 mtg.
Whiteboard: Request R&SR → [PDT+] Request R&SR
Request SR again.
the switch statement looks good.

I'm not so sure about the setting checked="true" by default in the xul.  if the 
default is keep all messages, that should be in the prefs.  it looks like 
you've got code in am-offline.js to set check the right value if the pref is 
set.

it seems like adding this to mailnews.js might do the trick:

pref("mail.server.default.retainBy",1);

can you try that and if it works attach a new patch?
checked="true" by default has dual duties here, first it makes the default 
selectItem property,  second, it fixed the dialog toggline reprainting problem 
for nntp.
did you try it with the default pref, and with out the checked="true"?

did the re-painting problem still occur?
Yes,  I tried with the default pref in mailnews.js, and with out the 
checked="true"? in am-offline.js.  It has wired behavior,  if you click 
"Offline & Disk Space" for nntp server, first time account panel shows nntp,  
after gettings to imap server, coming back to nntp for "Offline & Disk Space", 
it still shows imap's "Offline & Disk Space". 
Attached patch New fixSplinter Review
Last time, there was something wrong with the news acount.
Actually, the default pref in mailnews.js behaves the same as the checked 
selection.

Create a new diff with Seth's suggestion.
so checked="true" in the xul is not needed?  all that is needed is the new
default pref in mailnews.js?

if http://bugzilla.mozilla.org/showattachment.cgi?attach_id=38776 is the
complete and final patch, sr=sspitzer
default pref in mailnews.js and the default switch statement cover the default 
preference now.
r=bhuvan
assuming the http://bugzilla.mozilla.org/showattachment.cgi?attach_id=38776 is
the complete fix (I can't tell from your comments), sr=sspitzer
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Commercial Builds
2001-06-21-09-trunk win nt 4.0
2001-06-21-08-trunk/ mac 9.0.4
2001-06-22-11-trunk/ linux 2.2, red hat 7.0

Verified now when you set up a new newsgroup account
the default pref "Keep all Messages" is set (radio
button checked) and works as expected (all messages
are kept).
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: