Closed Bug 1454408 Opened 6 years ago Closed 6 years ago

Clean up preferences calls needing default values in SeaMonkey

Categories

(SeaMonkey :: Preferences, enhancement)

enhancement
Not set
normal

Tracking

(seamonkey2.58 fixed, seamonkey2.53 fixed, seamonkey2.57esr fixed)

RESOLVED FIXED
seamonkey2.58
Tracking Status
seamonkey2.58 --- fixed
seamonkey2.53 --- fixed
seamonkey2.57esr --- fixed

People

(Reporter: frg, Assigned: frg)

References

Details

Attachments

(5 files)

Services.prefs.getIntPref, Services.prefs.getBoolPref and Services.prefs.getStringPref can now take a default entry starting with Geck 54 / SeaMonkey 2.51. We can now replace GetIntPref, GetBoolPref and GetStringPref with the standard calls and remove the old functions.
suite part
SeaMonkey Composer part.

mail and mailnews do not need similiar patches. Need to test them in 2.53 before I ask for review.
Comment on attachment 8968225 [details] [diff] [review]
1454408-suiteprefs.patch

Seems to be ok.
Attachment #8968225 - Flags: review?(iann_bugzilla)
Comment on attachment 8968227 [details] [diff] [review]
1454408-editorprefs.patch

Seems to be ok.
Attachment #8968227 - Flags: review?(iann_bugzilla)
Additional note. Services.prefs.getStringPref can only used in 58 / 2.55 and up.
Comment on attachment 8968225 [details] [diff] [review]
1454408-suiteprefs.patch

>+++ b/suite/common/utilityOverlay.js

>-  var loadInBackground = GetBoolPref("browser.tabs.loadInBackground", false);
>+  var loadInBackground =
>+    Services.prefs.getBoolPref("browser.tabs.loadInBackground");
We've lost the false argument here...

>-  var loadInBackground = GetBoolPref("browser.tabs.loadInBackground", false);
>+  var loadInBackground = 
>+    Services.prefs.getBoolPref("browser.tabs.loadInBackground");
...and here.

r=me with those fixed.
Attachment #8968225 - Flags: review?(iann_bugzilla) → review+
Comment on attachment 8968227 [details] [diff] [review]
1454408-editorprefs.patch

LGTM r=me
Attachment #8968227 - Flags: review?(iann_bugzilla) → review+
> ...and here.
> r=me with those fixed.

This was deliberate. We define it in suite/browser/browser-prefs.js and the calls are inconsistent. The default is not needed. See

https://dxr.mozilla.org/comm-central/search?q=browser.tabs.loadInBackground&redirect=false
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/4d0730901995
Replace getPref calls needing a default value with standard Services calls. Suite part. r=IanN DONTBUILD
https://hg.mozilla.org/comm-central/rev/bd8822971340
Replace getPref calls needing a default value with standard Services calls. SeaMonkey Composer part. r=IanN DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Seamonkey2.58
Comment on attachment 8968225 [details] [diff] [review]
1454408-suiteprefs.patch

[Approval Request Comment]
Regression caused by (bug #): --
User impact if declined: The fishes told me that they dislike the current code.
Testing completed (on m-c, etc.): c-b c-r (without strings) in 2.53
Risk to taking this patch (and alternatives if risky): just a cleanup
String changes made by this patch: --
Attachment #8968225 - Flags: approval-comm-beta?
Attachment #8968227 - Flags: approval-comm-beta?
2.53 version if ever needed
2.53 version if ever needed
Who do you expect to approve the beta, me or Ian? One patch is suite/ only, the other one is editor/, so I could approve that one, but since this is a SM bug, I can't approve anything :-(
Thanks for asking. Composer only and not really urgent (just to make backports easier) so I think IanN should do it. SeaMonkey 2.57 based on 60 goes nowhere in the next few months :(
Comment on attachment 8968225 [details] [diff] [review]
1454408-suiteprefs.patch

a=me
Attachment #8968225 - Flags: approval-comm-beta? → approval-comm-beta+
Comment on attachment 8968227 [details] [diff] [review]
1454408-editorprefs.patch

a=me
Attachment #8968227 - Flags: approval-comm-beta? → approval-comm-beta+
doh ...

Target 2.53.1
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/1fc0cc36a78bc4a30146072b9ae7a7138cc24197
Replace getPref calls needing a default value with standard Services calls. Suite part.
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/c7ef12754d97bd9f6fa57d20a9dd733add33724b
Replace getPref calls needing a default value with standard Services calls. SeaMonkey Composer part.
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/fc7b4bd2cea8c3e4ce38d387057e0729b7dfeccf
Followup typo fix. r=me a=me

Target 2.53.3
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/ca7901a632e73207df2fd4416cbdbf1f8a49e317
Replace getPref calls needing a default value with standard Services calls. Follow-up for 2.53.3. r=IanN a=IanN

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

Attachment

General

Created:
Updated:
Size: