[Geany] Plugin Manager and important API change

Enrico Tröger enrico.troeger at xxxxx
Tue Nov 20 18:30:01 UTC 2007


Hi all,

I just added a Plugin Manager dialog which allows you as user to select
which plugins should be loaded at startup. You can also load and unload
plugins on the fly as needed. In this way, you can get rid of any
plugins which are installed but you don't want to use.

Furthermore, there is a preferences button which allows you to call a
plugin's configuration dialog if it provides one. Please note, you can
configure plugins only when they are already loaded (i.e. the checkbox
is active).

For plugin developers:
- I added a new field "author" to the plugin info struct, this means you
have to adjust the INFO() macro in your code and add an author string as
last argument. Unless your plugin won't build anymore. Sorry.
The author field is displayed in the Plugin Manager together with
plugin's description.
- If your plugin needs some configuration, you can add a function with
the following signature:
void configure(GtkWidget *parent);
Geany will call this function everytime an user click on the
preferences button in the Plugin Manager. Your code should create a
dialog to provide some configuration options. The passed widget is a
reference to the Plugin Manager dialog and should be used as parent
window for your dialog.
If you don't need any configuration options at all, just skip it and
don't use this function(it even doesn't have to be defined or
declared).
configure() will always be called after your plugin's init() function
was called. So it is safe to use things in configure() which are
created/allocated in init().
- Take care of your code in cleanup(), you can't assume Geany is exited
afterwards because it is also called when the user unloads the plugin
in the Plugin Manager dialog. So, release all allocated resources,
remove and destroy added widgets and generally leave Geany in the same
way as at the time when init() was called.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20071120/d631fbd2/attachment.pgp>


More information about the Users mailing list