[Geany-devel] plugin keybindings

Nick Treleaven nick.treleaven at xxxxx
Mon Aug 18 12:02:17 UTC 2008


Hi,

On Sun, 17 Aug 2008 20:06:45 +0200
Prim András <pa at primandras.hu> wrote:

> I've started to write a plugin that puts configurable text around the 
> selection (e.g. <b> ... </b>).

Cool. Are you aware of the geany-plugins SVN hosting?
http://lists.uvena.de/geany/2008-April/003225.html

...
>     /*  read keybinding number from config file  */
>     plugin_keys = g_new(GeanyKeyBinding, num_keybindings);
>     plugin_key_group->count = num_keybindings;
>     plugin_key_group->keys = plugin_keys;
> ...
> }
> </code>
> 
> It works for me, but I don't know whether it is conceptionally right
> or wrong.

This should be fine (the Lua plugin also does this).

> The other thing: is it possible to change the keybinding group when 
> edited file changes? (e.g. having 20 keybindings for HTML files, but 
> only 2 for C?)

I guess this might be OK, but I haven't tried it. IIRC Geany
doesn't keep any caches of the plugin key group key items or a count.

Regards,
Nick



More information about the Devel mailing list