Closed Bug 236782 Opened 21 years ago Closed 20 years ago

all preference items in "HTTP Networking" is not lockable;

Categories

(SeaMonkey :: Preferences, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eagle.lu, Unassigned)

References

Details

Attachments

(1 file, 4 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.1) Gecko/20040102
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.1) Gecko/20040102

If the items in the HTTP Networking are locked by autoconfig.jsc. They are not
actually locked. i.e. user can still edit these items in preferences panel.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Attached patch patch v0 (obsolete) — Splinter Review
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 143265 [details] [diff] [review]
patch v0

Can you give a "r" 
Thanks
Attachment #143265 - Flags: review?(dave532)
Please don't add consumers of nsIPref.  It's deprecated and needs to be removed.
 Use nsIPrefService.
Comment on attachment 143265 [details] [diff] [review]
patch v0

I'm not an official patch reviewer so won't be able to give you r=, Boris would
be a better person to ask
Attachment #143265 - Flags: review?(dave532)
Attachment #143265 - Attachment is obsolete: true
Comment on attachment 146084 [details] [diff] [review]
I changed nsIPref to nsIPrefService

Can you give r?
Attachment #146084 - Flags: review?(bzbarsky)
Comment on attachment 146084 [details] [diff] [review]
I changed nsIPref to nsIPrefService

Brian, did you test this?  There is no PrefIsLocked() method on nsIPrefService.
 You want to get that contractid as an nsIPrefBranch, then use the method on
that.

Next time please test the patch before posting it, ok?
Attachment #146084 - Flags: review?(bzbarsky) → review-
Attachment #146084 - Attachment is obsolete: true
Attached patch Change nsIPrefService to nsIPref (obsolete) — Splinter Review
Thanks 

I modified the patch and test it. It works now.
Can you give it r?
Comment on attachment 146166 [details] [diff] [review]
Change nsIPrefService to nsIPref

Can you give a r?
Attachment #146166 - Flags: review?(bzbarsky)
Comment on attachment 146166 [details] [diff] [review]
Change nsIPrefService to nsIPref

This is just the first patch you posted.  I've already said that that's not
acceptable.
Attachment #146166 - Flags: review?(bzbarsky) → review-
Attachment #146166 - Attachment is obsolete: true
Attached patch Remove the code using nsIPref (obsolete) — Splinter Review
How about this one? I have tested it and it works
Comment on attachment 146458 [details] [diff] [review]
Remove the code using nsIPref

Can you give r now?
Attachment #146458 - Flags: review?(bzbarsky)
Comment on attachment 146458 [details] [diff] [review]
Remove the code using nsIPref

This looks much better!

>+    var doDisable = !(enableHTTP11.selected && enableKeepAlive.checked)|| isLocked;

Space before the "||", please?

What happened to disabling the pipelining proxy pref too?  That was in the
earlier patches, right?
Attachment #146458 - Attachment is obsolete: true
Thanks for your comments. I have re-made the patch accroding to your comments
Comment on attachment 146823 [details] [diff] [review]
I added the codes for "proxy" section

Can you give r now?
Thanks
Attachment #146823 - Flags: review?(bzbarsky)
Comment on attachment 146823 [details] [diff] [review]
I added the codes for "proxy" section

r/sr=bzbarsky; looks good.  Thanks for making the changes.  Neil should
probably give this a once-over.
Attachment #146823 - Flags: superreview+
Attachment #146823 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #146823 - Flags: review?(bzbarsky)
Attachment #146458 - Flags: review?(bzbarsky)
Hi,BZ,
  Would you please help me to checkin the path? Because I have no such right yet.
Thanks 
Sure; once Neil OKs it I can check it in.

You may want to file a parallel bug on firefox to fix their copy of this pref
panel...
Ok
Fix checked in to the trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attachment #146823 - Flags: review?(neil.parkwaycc.co.uk) → review+
can someone explain why the patch wasn't as simple as changing:
     enablePipelining.disabled = doDisable;
to:
     enablePipelining.disabled |= doDisable;
?
Suppose preference P's prefstring is "p", user can set a lock on "p", which
means that prefernce P should be disabled after launching Mozilla. That is what
the patch does.

If we just replace 
    enablePipelining.disabled = doDisable;
with:
    enablePipelining.disabled |= doDisable;
There will be two issues:
1. We can't disable P if p is locked.
2. if p is not locked in autoconfig.jsc and once P is disabled by changing some
other preference say Q, P will not enable again even user change the settings of Q.
*** Bug 241416 has been marked as a duplicate of this bug. ***
(In reply to comment #22)
> If we just replace 
>     enablePipelining.disabled = doDisable;
> with:
>     enablePipelining.disabled |= doDisable;
> There will be two issues:
> 1. We can't disable P if p is locked.

Maybe I have misunderstood some things in preferences... But doesn't the
widgetstatemanager usually disable items that are locked? And wasn't, therefore,
your patch only needed because this assignment to .disabled overrode it?

> 2. if p is not locked in autoconfig.jsc and once P is disabled by changing some
> other preference say Q, P will not enable again even user change the settings
of Q.

Oh, yeah, that is a good point. so nevermind.
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: