[Geany-Devel] RFC: Keybindings rewrite

Thomas Martitz kugel at xxxxx
Sun Jun 8 12:55:56 UTC 2014

Am 08.06.2014 01:34, schrieb Matthew Brush:
> 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.
> Cheers,
> Matthew Brush

I agree, the GtkActions should be in the glade file. It has the big 
advantage that you can use glade to assign buttons to actions. Whereas 
having it in the code brings no advantage in my book.

While GtkActions itself aren't widgets they are to be activated through 
widgets (buttons, menu items, etc.). Keybindings are an added feature. 
All actions have at least one activating widget, but not all have 

Best regards.

More information about the Devel mailing list