The main menu hook lets you hook into various main menus in Evolution, based on the current active view (component). The system works by piggy-backing on the existing use of the BonoboUI menu system used by all of the Evolution components. Bonobo handles the menu merging and user input, and the hook resolves the verb being invoked and redirects it to the plugin. Each view defines a single target which describes the appropriate context. For the Mail view, this is the current folder and currently selected message(s).
Each view keeps track of its own manager object. When it is (de)activated, it also (de)activates the management object which dynamically adds and removes the menu items from the BonoboUIContainer via a supplied BonoboUI XML definition file <perhaps it should embed the bonobouixml>. If the target changes, the view lets the manager know, and it updates the visibility and sensitivity of objects appropriately, allowing reasonably dynamic user-interfaces to be managed automatically. The plugin itself isn't loaded until the menu item in question is invoked
Simple menu items and toggle menu items are supported currently. Also, because actual menu display is driven by BonoboUI, then toolbar items can also be added using this mechanism.
Not sure if this fits here as such. Probably temporary placeholder.
<hook class="com.ximian.evolution.mail.bonoboMenu:1.0"> <menu id="menuid" target="targettype" <ui file="/path/to/bonobo-ui-menu-definition.xml"> + <item type="item | toggle | radio" active ? path="/commands/FooBar" verb="FooBar" visible="target mask" ? enable="target mask" ? activate="function spec"/> * </menu> * </hook>
Need to define menu tag