Re: Multiple accelerators for one action



On Fri, Apr 4, 2014 at 12:58 AM, David King <amigadave amigadave com> wrote:
On 2014-04-03 16:28, Brian Marshall <bmarsd gmail com> wrote:
I have an action (zooming in, for example) that needs multiple
keyboard accelerators ("plus", "equal", "KP_Add"). I'm using a
Gio::Action (gtkmm), with the accelerator added separately to the
Gtk::Application. Intuitively, I'd expect multiple calls to
Gtk::Application::add_accelerator() to add multiple accelerators for a
single action, but instead it replaces the last one.

As of 3.12, you can use gtk_application_set_accels_for_action():

https://developer.gnome.org/gtk3/stable/GtkApplication.html#gtk-application-set-accels-for-action

I guess that is wrapped in gtkmm.

That looks great, I didn't realize this was fixed in 3.12. I'm still
using 3.10, but this is something to look forward to when I upgrade.
Thanks!


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