Closed
Bug 309041
Opened 19 years ago
Closed 19 years ago
Changing the proportional font does not update the default font until options are re-opened
Categories
(Firefox :: Settings UI, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 alpha1
People
(Reporter: mossop, Assigned: mossop)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 6 obsolete files)
6.35 KB,
patch
|
asaf
:
review+
asa
:
approval1.8rc1-
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
This occurs when the options are not using instantapply. 1. Open options to the content pane. 2. Note the default font setting. 3. Click advanced. 4. Change the proportional font option. 5. Click ok. The default font will be unchanged in the main options. Clicking ok then re-opening options will change the default font correctly. In an instantapply setup the default font does change correctly.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•19 years ago
|
||
The problem is that when child dialogs are accepted in non-instantapply, they store their settings in a set of preference elements in the prefpane that opens them. This patch adjusts the font options in the content pane to use the correct id's for the preference elements it uses so they correspond with the ones used by the child dialog. Although not strictly necessary it also places all the font prefs into the extra preferences element that the child dialog will create anyway. This has the added effect that changing the font settings then opening the advanced will show the changes in the advanced dialog.
Assignee | ||
Updated•19 years ago
|
Attachment #196559 -
Flags: review?(mconnor)
Assignee | ||
Comment 2•19 years ago
|
||
An alternative to this patch would be to make some changes to the prefwindow binding. Child prefwindows could be made to automatically find a corresponding preference element in the parent dialog an use that for storage, only resorting to creating its own with a special id when necessary. This should fix this situation, possibly other similar situations that I havent seen, and would also work correctly if two different child dialogs both use the same pref.
Assignee | ||
Updated•19 years ago
|
Attachment #196559 -
Flags: review?(mconnor)
Assignee | ||
Comment 3•19 years ago
|
||
When looking for saved state for a child prefwindow, this attempts to find any preference element on the parent window with the right name. When saving state the same search is performed and only if no element is found is a new element created.
Attachment #196559 -
Attachment is obsolete: true
Assignee | ||
Comment 4•19 years ago
|
||
Fixed a minor typo
Attachment #196575 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #196576 -
Flags: review?(mconnor)
Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 196576 [details] [diff] [review] Same patch with typo fix Since this changes the behaviour of the binding a little it might be nice to get it in for 1.5, don't think its a blocker though.
Attachment #196576 -
Flags: review?(mconnor) → review?(bugs.mano)
Assignee | ||
Comment 6•19 years ago
|
||
There is no longer any need to set an id on the generated preference element for the child state.
Assignee | ||
Updated•19 years ago
|
Attachment #196576 -
Attachment is obsolete: true
Attachment #198210 -
Flags: review?(bugs.mano)
Assignee | ||
Updated•19 years ago
|
Attachment #196576 -
Flags: review?(bugs.mano)
Comment 7•19 years ago
|
||
Comment on attachment 198210 [details] [diff] [review] No longer set preference id >Index: toolkit/content/widgets/preferences.xml >=================================================================== >+ var preference = null; >+ var pprefs = pdoc.getElementsByTagName("preference"); >+ for (var i = 0; i < pprefs.length; ++i) { >+ if (pprefs[i].name == this.name) { >+ preference = pprefs[i]; >+ break; >+ } >+ } ... >+ var preference = null; >+ var pprefs = pdoc.getElementsByTagName("preference"); >+ for (var k = 0; k < pprefs.length; ++k) { >+ if (pprefs[k].name == preferences[j].name) { >+ preference = pprefs[k]; >+ break; >+ } >+ } As discussed on IRC, make those two loops address the common case a bit better. > if (!preference) { >- var preference = pdoc.createElement("preference"); >+ preference = pdoc.createElement("preference"); > childPrefs.appendChild(preference); >- preference.id = prefID; You've to make sure updateElements, disabled and tabIndex don't fail/warn in the case where there's no id.
Attachment #198210 -
Flags: review?(bugs.mano) → review-
Assignee | ||
Comment 8•19 years ago
|
||
Addressed Mano's comments.
Attachment #198210 -
Attachment is obsolete: true
Attachment #198678 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 9•19 years ago
|
||
Addressed comments from IRC. Removed break statement. Wrapped the longer lines.
Attachment #198678 -
Attachment is obsolete: true
Attachment #198686 -
Flags: review?(bugs.mano)
Assignee | ||
Updated•19 years ago
|
Attachment #198678 -
Flags: review?(bugs.mano)
Comment 10•19 years ago
|
||
Comment on attachment 198686 [details] [diff] [review] patch >- this._setValue(lastStatePref ? lastStatePref.value >- : this.valueFromPreferences, false); >+ >+ // Try to find a preference element in the parent window with the same >+ // name as this one. how about "a preference element for the same preference"? >+ if (parentPrefs[l].localName == "preference") { >+ preference = parentPrefs[l]; >+ } >+ } remove single line brackets. > for (var i = 0; i < panes.length; ++i) { > var preferences = panes[i].preferences; > for (var j = 0; j < preferences.length; ++j) { >- var prefID = window.location.href + "#" + preferences[j].id; >- var preference = pdoc.getElementById(prefID); >+ remove the whitespace in this line. r=mano with these changes.
Attachment #198686 -
Flags: review?(bugs.mano) → review+
Assignee | ||
Comment 11•19 years ago
|
||
Patch addressing Mano's comments.
Attachment #198686 -
Attachment is obsolete: true
Attachment #198793 -
Flags: review?(bugs.mano)
Comment 12•19 years ago
|
||
Comment on attachment 198793 [details] [diff] [review] Final patch r=mano.
Attachment #198793 -
Flags: review?(bugs.mano) → review+
Comment 13•19 years ago
|
||
Checking in toolkit/content/widgets/preferences.xml; /cvsroot/mozilla/toolkit/content/widgets/preferences.xml,v <-- preferences.xml new revision: 1.42; previous revision: 1.41 done
Assignee | ||
Comment 14•19 years ago
|
||
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking1.8rc1?
Assignee | ||
Updated•19 years ago
|
Attachment #198793 -
Flags: approval1.8rc1?
Comment 15•19 years ago
|
||
Comment on attachment 198793 [details] [diff] [review] Final patch too late for non-critical changes.
Attachment #198793 -
Flags: approval1.8rc1? → approval1.8rc1-
Updated•19 years ago
|
Flags: blocking1.8rc1? → blocking1.8rc1-
Updated•19 years ago
|
Flags: blocking-aviary2?
Updated•19 years ago
|
Attachment #198793 -
Flags: approval1.8.1+
Updated•19 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Comment 16•19 years ago
|
||
Checked in on the 1.8 branch for Firefox 2. mozilla/toolkit/content/widgets/preferences.xml; new revision: 1.31.2.9;
Keywords: fixed1.8.1
Target Milestone: --- → Firefox 2
Updated•19 years ago
|
Target Milestone: Firefox 2 → Firefox 2 alpha1
You need to log in
before you can comment on or make changes to this bug.
Description
•