Closed Bug 306842 Opened 19 years ago Closed 18 years ago

Pref overlays should use insertafter/insertbefore instead of position

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(3 files, 1 obsolete file)

From comments on bug 189821:

http://lxr.mozilla.org/seamonkey/source/editor/ui/composer/content/editorPrefsOverlay.xul#29
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-appearance.xul#65
http://lxr.mozilla.org/seamonkey/source/mailnews/base/prefs/resources/content/mailPrefsOverlay.xul#46
http://lxr.mozilla.org/seamonkey/source/calendar/resources/content/pref/prefOverlay.xul#60

At the locations above, and elsewhere in those files, we use position to
determine the order of the elements in the pref panes. Currently, mailnews &
calender conflict, with them both using position 3. We should be using
insertafter/insertbefore as its more reliable.
Attached patch Possible patch (obsolete) β€” β€” Splinter Review
Assignee: prefs → bugzilla
Status: NEW → ASSIGNED
(In reply to comment #2)
> Created an attachment (id=266112) [details]
> Possible patch
> 
Forgot to say: I'm still testing this, but hopefully this will be the one.
(In reply to comment #1)
>(In reply to comment #0)
>>http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-appearance.xul#65
>pref-appearance.xul and calendar's prefOverlay.xul no longer exist.
pref-appearance.xul does exist, but it got moved to suite/common/pref
(In reply to comment #4)
> (In reply to comment #1)
> >(In reply to comment #0)
> >>http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-appearance.xul#65
> >pref-appearance.xul and calendar's prefOverlay.xul no longer exist.
> pref-appearance.xul does exist, but it got moved to suite/common/pref
> 
Sorry, yes your right, however it doesn't seem to have any position attributes in it now.
Attached patch The fix β€” β€” Splinter Review
This patch works properly.
Attachment #266112 - Attachment is obsolete: true
Attachment #266177 - Flags: review?(iann_bugzilla)
Comment on attachment 266177 [details] [diff] [review]
The fix

r=me with non-top level ones to follow in another patch (permissions and wallet)
Attachment #266177 - Flags: review?(iann_bugzilla) → review+
Comment on attachment 266177 [details] [diff] [review]
The fix

Not sure if sr is required or not for editor, so requesting it just in case.
Attachment #266177 - Flags: superreview?(neil)
Comment on attachment 266177 [details] [diff] [review]
The fix

Sorry, you can't use insertbefore and insertafter on the same element.
Attachment #266177 - Flags: superreview?(neil) → superreview-
(In reply to comment #9)
>(From update of attachment 266177 [details] [diff] [review])
>Sorry, you can't use insertbefore and insertafter on the same element.
To be precise, insertbefore is ignored if insertafter is specified.
Comment on attachment 266177 [details] [diff] [review]
The fix

On second thoughts, I don't think you need those insertbefore attributes, so sr=me if you remove them.
(In reply to comment #11)
> (From update of attachment 266177 [details] [diff] [review])
> On second thoughts, I don't think you need those insertbefore attributes, so
> sr=me if you remove them.
> 
I just checked, it does work without the insertbefore attributes. I think I was getting mixed up when I was originally trying to get the patch working. I'll drop them before checkin.
(In reply to comment #11)
> (From update of attachment 266177 [details] [diff] [review])
> On second thoughts, I don't think you need those insertbefore attributes, so
> sr=me if you remove them.
> 
Checked in with inserbefore attributes removed.
This sorts out the positions attributes in walletPrefsOverlay and permissionsPrefsOverlay. I've also removed permissionsPrefsOverlay.{xul,dtd} as per discussion on irc that said the permissions didn't really need to be a separate overlay any longer.
Attachment #266354 - Flags: review?(iann_bugzilla)
Attachment #266354 - Flags: review?(iann_bugzilla) → review+
Attachment #266354 - Flags: superreview?(neil)
Attached patch contents.rdf fix β€” β€” Splinter Review
So as not to break xpfe builds for the little time they have remaining...
Attachment #266371 - Flags: superreview?(neil)
Attachment #266371 - Flags: review?(iann_bugzilla)
Attachment #266371 - Flags: review?(iann_bugzilla) → review+
Attachment #266354 - Flags: superreview?(neil) → superreview+
Attachment #266371 - Flags: superreview?(neil) → superreview+
Last two patches checked in -> fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: