I have created an extension that adds a new column to the main message list, basically following the New Column Howto. Now I would like to place the column directly before the subject column, which appeared to be possible by not persisting the ordinal field and adding a insertbefore attribute. However, I still need to manually choose the column from the column chooser to make it visible, and I also need to do this for each folder. Is there a way to insert this automatically to all message views just before the subject column? My goal is that the column appears automatically in all possible message view when the extension is installed.
My XUL overlay currently looks like this:
<overlay id="colovl"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://myext/content/column_overlay.js"/>
<tree id="threadTree">
<treecols id="threadCols">
<splitter class="tree-splitter" />
<treecol id="MyCol" insertbefore="subjectCol" fixed="true"
flex="2" hidden="false"
class="treecol-image"
label="MyCol" tooltiptext="Click to sort by MyCol" />
</treecols>
</tree>
</overlay>