The Transition from a Mozilla Package to a Firebird Extension - a FAQ
Please send all corrections, suggestions, or experiences in creating a Firebird Extension to Brian King.
1. Is the transition difficult, and will my code work in the new environment?
2. Does the install.js file have to change?
3. How do I add my application to the list of extensions in the Firebird Options (Tools->Options menu) window?
4. How do I launch my application, once it is installed?
5. I want to add a toolbar button for my extension, and add it to the 'Customize' D&D mechanism. Can it be done?
6. What does 'Disable Extension' do in the Options window?
7. How do I enable my application settings ('Settings button') in the Extensions panel?
8. Does my XUL/XBL code need to be re-written?
9. I like the sound of all this. Where can I go to find out more about Firebird extensions?
In short, no it is not difficult, yet this may depend on the scale of your add-on or application. The application I used, xFly, was straightforward. The application itself is unfinished and suffering from bit-rot, but that is a separate issue than the one discussed here.2. Does the install.js file have to change?
No, the installation file was just updated with some minor formatting changes. After a check for disk space, it adds the jar file, registers the chrome directories, and prompts the user to restart once successful. Nothing new here, see for yourself!3. How do I add my application to the list of extensions in the Firebird Options (Tools->Options menu) window?
All that is required is one line. In the extension manifest (main contents.rdf file), add the following to the package description:
This tells Firebird to list the program in the list of extensions once it is registered.
Here is the full description, which includes some other useful information such as the author, name, URL (if there is one), and a description of the extenstion which will appear in the Options list:
xFly listed as an extension in the Options window
As a Mozilla package, xFly was launched from the Tools menu. This was the desired option for Firebird too, which has a Tools menu.
It can be achieved with some modification to the main contents.rdf file, which contains the overlay information.
Added following to the list of files to overlay:
Then the description needs to be added for the file:
browser.xul is the main window for the Firebird application, and what you are saying here is that this is the file that you will be overlaying (the file where the menuitem will be going). The menuitem definition is contained in the file xflyextensionsoverlay.xul.
This is just one of many methods to overlay Firebird and launch the application, with another possibility being a toolbar button. 5. I want to add a toolbar button for my extension, and add it to the 'Customize' D&D mechanism. Can it be done?
Yes, it certainly can. There are several steps you have to take to get this up and running.
The first thing to do is to create your buttons. Note that to be effective you need to create 2 different size buttons, 20x20px and 32x32px. Firebird is capable of having small and large button icons.
Next up is to write the XUL for the button:
<toolbarbutton>is contained in a
<toolbarpalette>, the id of which (BrowserToolbarPalette) corresponds to the palette that contains the Drag and Drop buttons for the toolbar. This palette lives in the file browser.xul.
Finally, you need to get the styles right for your button, related to the appearance of the image you created. Here is some of the code for the large and small buttons contained in the overlay CSS file, xflyextensionsoverlay.css.
xFly D&D button on palette
Now everything should be in place, and you can grab your button and move onto one of your Firebird toolbars in the position that you wish.
xFly button on toolbar
Disabling the extension will essentially hide all references to your extension, and make it impossible to load from any overlaid UI components. With xFly, the menu item and button disappeared. However, you do have to restart Firebird when you do this for it to take effect. Currently there is no prompt to tell you to do this, so interaction with user is poor on this feature. I am sure this will change in future versions.7. How do I enable my application settings ('Settings button') in the Extensions panel?
You may have alternative routes to access settings for your application, but this is one "official" way of doing it via Firebird.
The idea is to provide a utility for launching a new window where the user can change the global configuration of the extension, for
features that require their input and choices.
In the extension manifest (main contents.rdf file), the following was added to the package description:
This tells Firebird to open the chrome window xflysettings.xul. This feature is still available even when the extension is disabled.8. Does my XUL/XBL code need to be re-written?
The latest roadmap says:
Note: the Phoenix toolkit is a compatible reimplementation of the XPFE toolkit, with added features such as customizable toolbars. We are not starting a new C++ GUI toolkit, we are simply moving to the next generation XUL toolkit.
Due to the fact that the new toolkit should be compatible with the XPFE toolkit, your code should work fine.
However, don't forget to test it anyway, and if possible take advantage of new features.
The only new features I could find currently are related to toolbar customisation, with the addition of
However, I am sure there will be more changes as the toolkit evolves.
Mozilla Firebird Project Page
Firebird Help, a comprehensive site with a lot of good information, including Themes, Extensions and Tips&Tricks
Various projects at mozdev.org hosting Firebird Extensions:
-  Submitted by: Steve Saturday June 21st 2003
I wonder if the Mozilla Calendar could be a firebird extension. I'd rather it was standalone and seperate, but as long as I can still use it.
-  Submitted by: Brian King Thursday June 26th 2003
Calendar is already available as a Firebird extension. It is already listed at extensionroom.mozdev.org
-  Submitted by: HJ Wednesday August 20th 2003
"WARNING: Something that I experienced during my testing was the icon not appearing correctly on the palette, instead as a group of unrelated icons. The image you might see is 'Toolbar.png', which contains all the main application icons for Mozilla Firebird in one image. It can also be accessed by typing 'chrome://browser/skin/Toolbar.png' in the browser location bar. As a matter of interest, they are extracted for use using the -moz-image-region CSS property. This problem was resolved by deleting your Mozilla Firebird user profile, something that is recommended in the 0.6 release notes."
All you need to do is to remove XUL.mfl from your profile directory, that's all :D
-  Submitted by: Alex Sunday August 31st 2003
-  Submitted by: Mike Sunday September 7th 2003
Very helpful comments here, thanks for posting this info.
-  Submitted by: JB Monday September 15th 2003
Very interesting information.