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
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to