如何“断开”连接GTK 中的加速器、按键事件或鼠标按下事件;小部件?
假设我有一个从第三方库获得的自定义 GTK+ 小部件。它有一个加速器,例如,当我按“h”或单击它时,它会隐藏自己,当我再次按“h”或双击它时,它会显示自己。我想禁用 GTK+ 小部件的这个特定功能。如何在不更改库的源代码并重建它的情况下做到这一点?
注意:你也可以用 c++ 给出你的解决方案,事实上,这样会更好,因为我在我的项目中使用 C++。
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.
我现在猜测,但是 gtk_widget_can_activate_accel () 怎么样?
http://developer.gnome.org/gtk /2.24/GtkWidget.html#gtk-widget-can-activate-accel
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