How to “disconnect” an accelerator , key-press-event or mouse-press-event in a GTK+ Widget?

雨燕双飞 提交于 2019-12-07 17:29:31

问题


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.


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!