Re: proposal: substantial change to keyboard-driven action handling



On Wed, 2008-05-07 at 11:38 +1000, Andrew Cowie wrote:

> As it stands right now GtkAction isn't quite generic enough (for
> example, it's all hard wired to use stock icons only, so if you've got
> UI elements that have the temerity to have nothing to do with stock
> functions and therefore have no stock icon, you can't take advantage of
> the create_*() functions) but in terms of having a unified handler for
> callbacks from different parts of a program GtkAction is great.

I can't say this has bothered me. I do not use the create_*() API at
all, but instead wrap everything related to actions into my own (C++)
ActionManager class, which is a singleton. You can see the API here:

http://viewcvs.ardour.org/filedetails.php?repname=Ardour&path=%
2Fbranches%2F2.0-ongoing%2Fgtk2_ardour%2Factions.h

Note that the calls that specify keys&modifiers are never used, and I
should remove them. Ardour does all keybinding via an accel map file
that is explicitly loaded.

Almost none of our actions are related to "stock" operations (and we
have at least 200 actions so far). They are represented in the GUI by
menu items and buttons.

The one thing that is very irritating at present is that its not
possible to attach keybindings to an action if there is no proxy for it
(unless you use GtkBuilder).

--p




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]