Say I have a custom GTK+ widget obtained from a third party library. It has an accelerator, e.g it hides itself when I press 'h' or click it, and shows itself when I press 'h' again or double-click it. I want disable this particular functionality of the GTK+ widget. How can I do this without changing the source code of the Library and rebuilding it?
Note: You can also give your solution in c++ , in fact it would be better that way because I am using C++ for my project.
I'm guessing now, but how about gtk_widget_can_activate_accel () ?
http://developer.gnome.org/gtk/2.24/GtkWidget.html#gtk-widget-can-activate-accel
来源:https://stackoverflow.com/questions/7711638/how-to-disconnect-an-accelerator-key-press-event-or-mouse-press-event-in-a-g