Re: [Evolution] Plugins with Python? [Was: Avoiding automatic marking as read]
- From: Matthew Barnes <mbarnes redhat com>
- To: Reid Thompson <Reid Thompson ateb com>
- Cc: "evolution-list gnome org" <evolution-list gnome org>
- Subject: Re: [Evolution] Plugins with Python? [Was: Avoiding automatic marking as read]
- Date: Thu, 31 May 2012 12:10:22 -0400
On Thu, 2012-05-31 at 13:30 +0000, Reid Thompson wrote:
Is this extension framework currently documented somewhere?
Or is it not publicly available yet?
The extension framework and various extensions have been in Evolution
since the Bonobo removal back in Evolution 2.30. The framework itself
now lives in Evolution-Data-Server, and all of the address book and
calendar backends are now written as extensions.
It's very simple. You basically subclass the base "EExtension" class,
or some base class derived from EExtension, and target some other class
which is marked as extensible. Your extension is automatically tacked
on to each instance of the target class, where you have full access to
the target class's public API, properties and signals.
Contrast this with EPlugin where you're limited to a set of pre-defined
hooks which feed you pre-determined data, and if you need anything else
from the application you're pretty much out of luck.
I wrote a basic "Hello World" tutorial here:
https://live.gnome.org/Evolution/Extensions
Some actual examples from Evolution 3.4:
http://git.gnome.org/browse/evolution/tree/modules?h=gnome-3-4
Each directory (or "module") in the 3.4 examples defines one or more
extension classes which work together. The "addressbook", "calendar",
and "mail" directories each contain a set of extensions which implement
the views you see in Evolution's main window.
Matthew Barnes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]