[Geany-Devel] RFC: Keybindings rewrite

Matthew Brush mbrush at xxxxx
Sat Jun 7 23:34:28 UTC 2014

On 14-06-07 03:35 PM, Colomban Wendling wrote:
> Le 06/06/2014 16:17, Thomas Martitz a écrit :
>> Hello,
>> based up on Matthew's fine GtkActions branch [1]
> We probably should not define the actions in the Glade file but rather
> in the code, they aren't really a UI thing but should reflect what the
> app can do basically.  Basically it's rather a replacement for our
> send_command() rather than simply keybindings.

IMO it's much better to use something declarative for this than to write 
it in code. Even though XML is kind of ugly, it's still more 
maintainable/easier/etc than C, especially since Glade supports 
creating/editing/assigning the actions through it's user interface.

Originally I was going to create a whole separate GtkBuilder file (ex. 
actions.xml or such) for actions, but then you loose the possibility to 
select the actions for the various widgets using Glade's user interface 
(unless I missed how to make it understand two files at once).

I don't really think it's a big deal having them in the main GtkBuilder 
file, I mean they are *UI* actions used to control the appearance and 
proxy the behaviour of *UI* widgets already in the same file with other 
stuff like list models for the UI, etc.

Matthew Brush

More information about the Devel mailing list