Closed Bug 178604 Opened 22 years ago Closed 22 years ago

when I add new columns to a tree in foo.xul, they appear to the far left (instead of the far right) for existing profiles

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: sspitzer, Assigned: neil)

References

Details

Attachments

(1 file, 5 obsolete files)

when I add new columns to a tree in foo.xul, they appear to the far left 
(instead of the far right) for existing profiles

this blocks the spam bug.

fix in hand, r=varga
Attached patch patch (obsolete) — Splinter Review
Attached patch patch with comment (obsolete) — Splinter Review
Attachment #105300 - Attachment is obsolete: true
accepting
Blocks: spamfe
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.3alpha
Comment on attachment 105301 [details] [diff] [review]
patch with comment

r=varga
Attachment #105301 - Flags: review+
this has sr=bienvenu.

marking fixed.

thanks jan.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment on attachment 105301 [details] [diff] [review]
patch with comment

>+  // if there is no ordinal, come up with a big number, so that
>+  // the column shows up on the far right
>+  // see bug #178604
>   for (i = 0; i < cols.length; ++i)
>-    cols[i].setAttribute("ordinal", (i*2)+1);
>+    cols[i].setAttribute("ordinal", cols[i].getAttribute('ordinal') ? ((i*2)+1) : (((cols.length + i + 1) * 2) + 1));
This should be hasAttribute rather than getAttribute...

>     
>   // update the ordinal positions of splitters to even numbers, so that 
>   // they are in between columns
Ah, but will they be in between the far right columns? I think not.
Attached patch supplimental patch (obsolete) — Splinter Review
testing this patch now.

neil, can you review?
that fix doesn't do quite what I want it to do.

my guess is after setting ordinals for the columns, we might have to assign 
ordinals to the splitters manually.

having some things have ordinal and others not, is problematic.
Comment on attachment 105348 [details] [diff] [review]
supplimental patch

this is going to require some more thought.
Attachment #105348 - Attachment is obsolete: true
This broke splitters on trees that don't have a persisted ordinal.
E.g. if you have a new profile, open history and there are no splitters.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Heh, and folderTree doesn't persist ordinals so it never works...
Blocks: 178827
Attached patch Proposed patch (obsolete) — Splinter Review
Backs out the previous patch and uses a fix that works with splitters.
Attachment #105958 - Flags: superreview?(sspitzer)
Attachment #105958 - Flags: review?(varga)
> This broke splitters on trees that don't have a persisted ordinal.
> E.g. if you have a new profile, open history and there are no splitters.

yoinks!

re-assign to neil@parkwaycc.co.uk, who has the right fix.
Assignee: sspitzer → neil
Status: REOPENED → NEW
Comment on attachment 105958 [details] [diff] [review]
Proposed patch

sr=sspitzer, thanks for fixing my regression.
Attachment #105958 - Flags: superreview?(sspitzer) → superreview+
Attachment #105958 - Flags: review?(varga) → review+
Apparently -moz-box-ordinal-group sorting isn't stable :-(
Column order in some trees (e.g. DOM inspector CSS rules) is wrong.
Attachment #105301 - Attachment is obsolete: true
Attachment #105958 - Attachment is obsolete: true
Attachment #106207 - Flags: superreview?(sspitzer)
Attachment #106207 - Flags: review?(varga)
By making all header elements (treecol, listheader, .tree-splitter) the same
ordinal group there's no problem with trees that don't set ordinals.
Attachment #106207 - Attachment is obsolete: true
Attachment #106357 - Flags: superreview?(sspitzer)
Attachment #106357 - Flags: review?(varga)
Attachment #106357 - Flags: review?(varga) → review+
Comment on attachment 106357 [details] [diff] [review]
All headers should default to the same group...

sr=sspitzer

assuming that large int is OK on all platforms.

thinking about loud,

that's 2^31 - 1 (or 2?)

so it should be safe.
Attachment #106357 - Flags: superreview?(sspitzer) → superreview+
i noticed how this affects order of columns in xul file picker (bug 180023).
OS: Windows 2000 → All
Hardware: PC → All
Attachment #106207 - Flags: superreview?(sspitzer)
Attachment #106207 - Flags: review?(varga)
Patch was checked in (a fortnight ago!) by timeless.
Status: NEW → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: