You can easily find information on how to create a new toolbar but if you want to add to an existing toolbar looking at the browser code was the best resource I could find. This is what it takes to add your controls on FireFox’s menu bar.
Browser.xul uses following tag hierarchy for toolbar.
<toolbox id=”">
<toolbar id=”">
<toolbaritem id=”">
Rest of the tags
</toolbaritem>
</toolbar>
</toolbox>
So if you want to extend an existing toolbar you just need to know its “id” and write your own xul. For example to append to the menubar I would write:
<toolbar id=”toolbar-menubar”>
<toolbaritem id=”">
my stuff
</toolbaritem>
</toolbar>
Following are the ids used in firefox, names are pretty self-explanatory
- toolbar-menubar
- nav-bar
- PersonalToolbar
- status-bar
By the way, in case you want to right align your additions <toolbarspring/> will come handy.