I think it better to port to GAction instead of GtkAction (GtkAction
has been deprecated since version 3.10 and will be removed in GTK+ 4),
so it will be ease to port geany to GTK+ 4 in the future.
Also, IIRC, there is a problem with GtkAction, wich cause to some
accelactors
to work only when the keywoard layout on Englisg.
For example, most of the accelactors in epiphany dosn't work when the
keywoard
layout is Hebrew, and it will be solved when someone will port epiphany
from GtkAction
GAction.
Also, I think it will be good idea to port all geany to GApplication &
GtkApplication,
GAction and GOptionContext and other new GTK+ API.
Regards,
Yosef Or Boczko
בתאריך ו', יונ 6, 2014 בשעה 5:17 PM, Thomas Martitz
<ku...@rockbox.org> כתב:
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
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel