[Geany] Plugin keybindings support in SVN
Nick Treleaven
nick.treleaven at xxxxx
Thu Mar 13 13:00:51 UTC 2008
On Thu, 13 Mar 2008 04:43:54 -0500
"Jeff Pohlmeyer" <yetanothergeek at gmail.com> wrote:
> On Wed, Mar 12, 2008 at 12:30 PM, Nick Treleaven
> <nick.treleaven at btinternet.com> wrote:
>
> > I've just merged plugin keybindings support into the trunk.
>
> Excellent!!!
>
> I hooked this API up to the Lua plugin, and already it is working!
Great ;-)
> Now users can list a few of their favorite scripts in
> ~/.geany/plugins/geanylua/hotkeys.cfg and the entries
> will show up in Geany's Edit->Preferences->Keybindings
> window.
>
>
> But that leaves me with some questions...
>
> Since the number of bindings needs to be pre-determined at
> compile time, I currently allow for a maximum of five script
> bindings - Does that sound like a reasonable number?
Thanks for bringing this up ;-)
Although the usual way using PLUGIN_KEY_GROUP requires a fixed number
of keybindings, it should be possible to set any number by
declaring plugin_key_group[] yourself and initializing it in init().
I'm just updating the doxygen plugin docs (work in progress, make -C
doc api-doc) as follows:
"@code KeyBindingGroup plugin_key_group[1] @endcode
Most plugins should use the PLUGIN_KEY_GROUP() macro to define it.
However, its fields are not read until after init() is called for the
plugin, so it is possible to setup a variable number of keybindings,
e.g. based on the plugin's configuration file."
Hopefully your other points about NULL labels are now moot ;-) I'll
answer the htmlchars bug in another email.
Regards,
Nick
More information about the Users
mailing list