Developer:Addons
From Spicebird
This page aims serve as a tutorial for extensions developers looking to write new addons for Spicebird or port existing Mozilla Thunderbird/Sunbird addons to Spicebird.
Contents |
Writing New Addons
Writing extensions for Spicebird is similar to writing extensions for any other Mozilla application. See Mozilla [http://goo.gl/qVP89century 21 broker properti jual beli sewa rumah Indonesia flash player century 21 broker properti jual beli sewa rumah Indonesia developer documentation] and MozillaZine documentation on writing extensions for any Mozilla application. Also see the notes section for Spicebird specific information you should know. mivo tv
Porting Thunderbird/Sunbird Addons
- Simple addons only need to change the list of their supported application IDs to include Spicebird. No other change will be required. To accomplish this, unzip the addon xpi file (its a normal zip file) and modify the install.rdf. Add a section for Spicebird along with other applications like this:
<em:targetApplication>
<Description>
<em:id>{ee53ece0-255c-4cc6-8a7e-81a8b6e5ba2c}</em:id>
<em:minVersion>0.7</em:minVersion>
<em:maxVersion>0.8.*</em:maxVersion>
</Description>
</em:targetApplication>
- An addon typically overlays its own user interface elements onto the main application. This is done using XUL overlay mechanism and XUL element ids are very critical for this process. Although most ids in Thundebird/Lightning match those of Spicebird, some ids had to be changed to accommodate the generic nature of Spicebird. So, the next step is to change the overlay targets and overlay ids in the addon.
- Make Spicebird specific changes to the addon. See the notes section below for more information.
- If the addon does not work on Thunderbird 3.0 betas, it mostly means that there is more work to be done on the addon to get it working on Spicebird. On the other hand, an addon that already works for Thunderbird 3.0 betas will need very few modifications to adopt it to Spicebird. mivo tv
- Very rarely, an addon will have a platform specific component in its xpi. You may have to recompile it with Spicebird if the platform specific component does not work right away. In this case keep in mind that an addon may be used on a variety of platforms that distributions like Fedora, Debian and Ubuntu support.
- To test the addon, first identify all the features and use cases of the addon being ported. Use the addon extensively in the native application, consult documentation and possibly look at the code. Make a list of all the UI elements, features and usage scenarios for the addon. Execute the test cases derived from this list.
- Submit the addon on addons.spicebird.org. It is also highly recommended that you send the changes to the original author of the addon so that whenever and where ever the original author releases the next version, Spicebird support will be available in that release.
Notes
Spicebird Application ID
To make an extension for Spicebird you will need to know Spicebird application GUID. It is
{ee53ece0-255c-4cc6-8a7e-81a8b6e5ba2c}
Spicebird 0.7.1 UI Changes
- There is only one sidebar splitter in 0.7 and all sidebar content in all applications is maintained in a single deck. Similarly, all the main application area content is maintained in another deck. This behavior changed in 0.7.1. Each application now has a separate sidebar splitter. All the application main area contents including the sidebar are now under a tab element. This also makes each application main area in Spicebird very similar to the upstream application like Thunderbird, Addressbook, Lightning etc.
Spicebird 0.8 UI Changes
As of now, there are no plans to change UI in a manner that will effect any applications.
Application Specific UI Elements
In Spicebird, a certain user interface element can appear in one only application, multiple applications or all applications. So, for example, it is possible to add a menu in such a way that it appears in Calendar and Tasks tabs and no other application. It is also possible to add a menu that appears in all the applications. The UI elements that work with this specification are: menus in main menubar, status bar elements and toolbar buttons.landscaping houston
This feature is triggered using the app attribute.
- All applications: By default, if the app attribute is not specified, it appears in all the applications.
- Specific application: To make an element appear in only one application, use the following syntax to add the app attribute to the element:
app="APPCODE"
For example, to define a menu item for the Chat application:
<menuitem id="my-chat-addon-menuitem1"
label="My Chat Addon"
app="im"/>
- Multiple applications: To make an element appear in multiple applications, use the following syntax to add the app attribute to the element:
app="APP1CODE,APP2CODE..."
For example, to make a toolbar button appear in Calendar and Tasks application:
<toolbarbutton typeid="my-calendar-addon-toolbarbutton1"
label="My Calendar Addon"
app="calendar,tasks"/>
- Application codes: Application codes used for specifying the value of the app attribute are defined as follows
| Application Name | Code |
|---|---|
| Home | home |
| Mail & Newsgroups | mailnews |
| Contacts | contacts |
| Chat | im |
| Calendar | calendar |
| Tasks | tasks |
Toolbar Buttons
- Spicebird toolbar items should not have an "id" attribute as it is possible to reuse toolbar buttons in multiple applications. For example, the "New" button appears in the toolbars of all applications. The "Get Mail" button can appear on Mail application and Home application.
- Spicebird toolbar buttons need only 22x22 icons at all time. We believe that 16x16 icons on toolbar are unnecessary so is the option to view smaller icons on toolbar. This saves considerable development effort.portland dentist
- It is recommended that all toolbar buttons have a description properly set, as in Spicebird the customize toolbar dialog shows description for all toolbar buttons.
Application Specific Addons
In Spicebird there are multiple applications in the same window. The user may choose to not load any of the applications during startup. This means that if an addon is meant to work with only a specific application, it should be kept in mind that the application may not be available based on user preferences. To avoid problems with UI and functionality, it is recommended that the addons overlay onto individual applications rather than the entire window. So, when an application is not loaded, the corresponding addons also don't show up. Each application has a main XUL UI file that gets overlaid onto the main application window. Addons have to overlay onto these overlay files instead of the main window.
| Application Name | Main Overlay File |
|---|---|
| Home | chrome://collab/content/collab.xul (might change soon) |
| Mail & Newsgroups | chrome://messenger/content/csMailnewsOverlay.xul |
| Contacts | chrome://messenger/content/addressbook/csContactsOverlay.xul |
| Chat | chrome://im/content/csIMOverlay.xul |
| Calendar | chrome://calendar/content/csCalendarOverlay.xul |
| Tasks | chrome://calendar/content/csCalendarOverlay.xul |
Some Important IDs
- Main window is called framework-window
- Main menubar is called framework-menubar
- Main toolpallette is called framework-toolpalette
- Main status bar is called status-bar
- Applet container is called framework-applets
- String bundle set is called framework-stringbundleset
- You can find out more IDs using the DOM inspector extension.
- Coursework Writing
- play and win