This will allow clients to programmatically reorder columns in their trees.
Created attachment 122273 [details] [diff] [review] Simplest way of doing this I think |moveColumn| is a bit better name for this than |reorderColumn|. But in talking to sspitzer perhaps we could have something like <method name="moveColumn"> <parameter name="colMove"/> <parameter name="colBefore"/> <body><![CDATA[ if (colBefore) this._reorderColumn(colMove, colBefore, true); else this._reorderColumn(colMove, this.lastOrdinalChild, false); ]]></body> </method> }
Created attachment 122274 [details] [diff] [review] Alternate approach Jan: let me know which approach you like best.
So I've talked with hewitt about this and we both agreed that something like // move colMove directly before or after colInsert moveColumn(colMove, colBefore, aBefore); would probably be simplest in use. My suggestion in comment 1 (always move before unless the second arg is null) would put the burden on the client of finding the next column if they want to move after, the details and knowledge of which I think we can more cleanly hide inside tree.xml. This suggestion isn't quite patch 122273, I don't think that code currently deals correctly with aBefore being false for anything but the last column.
>// move colMove directly before or after colInsert >moveColumn(colMove, colBefore, aBefore); looks good
The bug that needed this worked around this for now.
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 3 days ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.