[Evolution-hackers] e-plugin changes


I've added an 'id' property to the e-plugin element, this is used to uniquely identify each plugin loaded, and must be globally unique.  I had overlooked this originally and although it isn't used directly yet, it wont hurt to have it.

Plugins now wont load if they are missing this property or it isn't unique - you'll get a warning on the console (along with lots of other debug spew).

    id="test-c.plugin" ...>

Just add the id thing with something unique.  Using the class-type "com.novell.evolution.foo" or "au.id.notzed.test" type stuff might be a good convention to follow to make it easy to make things unique.

I've also made the plugin system spew a few slightly more useful warnings as things fail, which should help debugging.  And fixed some small bugs (particularly: the random crash on startup one).

And finally i've fixed up the loading order issue, now plugin definitions are cached in memory whenever they're loaded, until all the hooks defined in them have been published (via e_plugin_hook_register_type), at which point they are then garbage collected.  This lets code register hooks at any time, rather than having to register them before the plugins are loaded.  Going forward hooks will probably register in their get_type method rather than having to be done in a block like they are in mail-component.c now.

So the shell now loads the plugin definitions, and they are incrementally processed as and when the various components publish their hooks.

Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]