Open Bug 636859 Opened 12 years ago Updated 6 months ago

Simplify adding toolbarbuttons to toolbars on extension firstrun.


(Firefox :: Toolbars and Customization, defect)






(Reporter: pjdkrunkt, Unassigned)


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20110218 Firefox/3.6.14
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20110218 Firefox/3.6.14

Currently, in order to add a toolbar button to a toolbar on the first run of an extension but allow it to be moved around, authors must do several steps:

- Add the button to the customize palette.  This is pretty easy and works the same way Firefox adds button to the palette.

- Use a first-run script to add the button to the currentset of the desired toolbar.

There is quite a bit of documentation on this:

However, none of this documentation is currently provided on the MDN article about the addon-bar, which is leading to quite a bit of confusion:

Authors may choose basically any method they want for adding buttons to toolbars, including forcing them to appear on certain toolbars in certain positions, or adding them to the palette but not automatically putting them on the toolbar.  It would be good if Firefox was handling the first-run part for the extensions.  Perhaps there could be an attribute added to toolbar buttons in the customize palette like:


The properties for that attribute could be the name of the toolbar the button should appear on, like:


A button in the customize palette with that attribute would be automatically added to the addon bar on the first run of the extension, but would be free to be moved where-ever the user wants.  Perhaps these could also be restored when the "Restore Default Set" button is pressed?  In addition, this would be a good way to detect whether or not to show a hidden toolbar.  

Reproducible: Always
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.