I've been writing a Gtk+ application using gtkmm, and I'm trying to add a global keyboard shortcut which calls a callback. Unfortunately, the connect() method of Gtk::AccelGroup isn't available in gtkmm, apparently intentionally because you can make the connections using ActionGroups...
Anyway, I have the following code:
actions_= Gtk::ActionGroup::create();
actions_->set_accel_group(Gtk::AccelGroup::create());
actions_->add(
Gtk::Action::create("new"), Gtk::AccelKey("<control>n"),
sigc::mem_fun(this, &Window::new_buffer_thing)
);
_gtk_window().add_accel_group(actions_->get_accel_group());
Which compiles and runs without warning, but the keyboard shortcut does nothing. I've been fiddling with this for hours, so any help or direction would be appreciated!
Am I doing something obviously wrong? Why wouldn't the accelerator work?