[Geany-Devel] RFC: Keybindings rewrite
Thomas Martitz
kugel at xxxxx
Fri Jun 6 14:17:13 UTC 2014
Hello,
based up on Matthew's fine GtkActions branch [1] I think we could
realistically rewrite keybindings.c use GtkAction/accelerators properly.
Currently it re-implements lots of gtk stuff, such as the actual looping
through the known keybindings for the callback when a keybinding
pressed. When this would be rewritten keybindings.c could probably be
half as large (in LOC terms).
The advantage of doing so would be that plugins could register
keybindings simply by providing a GtkAction instance (and optionally a
GtkMenuItem) instead of a plain callback. This would enable to handle
keybindings in a more natural (from a glib/gtk POV) form through
signals. This is especially interesting for non-C plugins because it
easier to support/implement a gobject-based API then a
function-pointer-based one. This is the major reason I'm interested in this.
I think it is possible to do this without breaking the API or at least
without actual damage because plugins don't use the fields of
GeanyKeyGroup and GeanyKeyBinding so we can change these structs.
Is such a rewrite desirable, and would it have a realistic chance of
getting merged? I'm asking because I don't want to spend time on this
and never get it merged. Otherwise I would volunteer to do this.
Best regards.
[1]: https://github.com/codebrainz/geany/tree/actions
More information about the Devel
mailing list