Last Comment Bug 866503 - Notifications preference pane doesn't observe locked status for show_alert and show_balloon
: Notifications preference pane doesn't observe locked status for show_alert an...
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
: -- minor (vote)
: seamonkey2.20
Assigned To: rsx11m
:
:
Mentors:
Depends on:
Blocks: 856454
  Show dependency treegraph
 
Reported: 2013-04-28 06:25 PDT by rsx11m
Modified: 2013-04-29 05:50 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch (1.77 KB, patch)
2013-04-28 06:34 PDT, rsx11m
neil: review+
Details | Diff | Splinter Review

Description rsx11m 2013-04-28 06:25:49 PDT
After learning how to lock preferences (bug 861471 comment #43) I've revisited the logic for bug 856454. While the individual mail.biff.alert.show_* prefs are correctly disabled on locking (and remain disabled when the entire vbox is enabled again, so that part is taken care of by the prefwindow already), the logic for unchecking one alert when selecting the other is still active.

STR:
 1. lock "mail.biff.show_alert" to true
 2. verify that "Show an alert" box is checked but disabled
 3. check "Show a balloon" (with "Show an icon" checked)
 4. note that "Show an alert" becomes unchecked despite locking

Thus, the locked status has to be verified in both instances before changing the value in response to checking the other alert's box.
Comment 1 rsx11m 2013-04-28 06:34:48 PDT
Created attachment 742819 [details] [diff] [review]
Proposed patch

This patch assigns "false" only if the preference to be changed is not locked.

In theory, this allows now both show_alert and show_balloon to be selected at the same time (e.g., one is locked "true" and the other checked by the user). It is safe to assume that, if an administrator wants to prevent that case, he or she would lock both show_alert and show_balloon preferences.
Comment 2 rsx11m 2013-04-28 06:42:13 PDT
> individual mail.biff.alert.show_* prefs are correctly disabled on locking
> ([...] that part is taken care of by the prefwindow already),

Actually, that's done by EnableElement() as called from EnableElementById().
Comment 3 neil@parkwaycc.co.uk 2013-04-28 10:43:55 PDT
Comment on attachment 742819 [details] [diff] [review]
Proposed patch

Seems reasonable.
Comment 4 rsx11m 2013-04-28 10:47:22 PDT
Thanks Neil. Push for comm-central, please.
Comment 5 Ryan VanderMeulen [:RyanVM] 2013-04-29 05:50:16 PDT
https://hg.mozilla.org/comm-central/rev/87d846122a36

Note You need to log in before you can comment on or make changes to this bug.