Closed Bug 665565 Opened 13 years ago Closed 13 years ago

Make fuller use of GetStringPref in suite

Categories

(SeaMonkey :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.4

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

References

Details

Attachments

(1 file, 2 obsolete files)

There are various parts of the suite code that could use GetStringPref helper from utilityOverlay.js
This patch:
* Tweaks GetStringPref helper to take a second argument for optional use.
* Switches more of the suite code to use GetStringPref helper.
Attachment #540485 - Flags: review?(neil)
Changes since last version:
* Fixed an issue where a try/catch had been hiding a missing Services.
Attachment #540485 - Attachment is obsolete: true
Attachment #540607 - Flags: review?(neil)
Attachment #540485 - Flags: review?(neil)
Comment on attachment 540607 [details] [diff] [review]
switch more of suite to use GetStringPref v2

>+  url = GetStringPref("sidebar.customize.all_panels.url", "about:blank");
If this is the only user, this could be written
url = GetStringPref("sidebar.customize.all_panels.url") || "about:blank";

>         if (LDAPSession) {
>-            let url = sPrefs.getComplexValue(autocompleteDirectory +".uri",
>-              Components.interfaces.nsISupportsString).data;
>+            let url = GetStringPref(autocompleteDirectory +".uri");
I don't really want to fiddle with this code: it's slated to be ripped out and replaced with a toolkit-based autocomplete component, see bug 452232. r- because of that.
Attachment #540607 - Flags: review?(neil) → review-
Changes since previous version:
* No tweaking of GetStringPref now.
* Removed LDAP changes.
* Made suggested changes to sidebar and inlined variable declaration.
Attachment #540607 - Attachment is obsolete: true
Attachment #541921 - Flags: review?(neil)
Comment on attachment 541921 [details] [diff] [review]
switch more of suite to use GetStringPref without LDAP [Checked in: Comment 6]

>-    url = urlFormatter.formatURL(url);
[Oops, looks like urlFormatter was never declared?]
Attachment #541921 - Flags: review?(neil) → review+
Comment on attachment 541921 [details] [diff] [review]
switch more of suite to use GetStringPref without LDAP [Checked in: Comment 6]

http://hg.mozilla.org/comm-central/rev/322b0049a5a7
Attachment #541921 - Attachment description: switch more of suite to use GetStringPref without LDAP → switch more of suite to use GetStringPref without LDAP [Checked in: Comment 5]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.4
Comment on attachment 541921 [details] [diff] [review]
switch more of suite to use GetStringPref without LDAP [Checked in: Comment 6]

Backed out incorrect patch:
http://hg.mozilla.org/comm-central/rev/18cdf1e1fc2b
Correct patch checked in:
http://hg.mozilla.org/comm-central/rev/e7d8e36b4769
Attachment #541921 - Attachment description: switch more of suite to use GetStringPref without LDAP [Checked in: Comment 5] → switch more of suite to use GetStringPref without LDAP [Checked in: Comment 6]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: