How disable global accelerators for certain widgets?



I have a global accelerator tied to space. But there is also a search function (exactly like mozilla thunderbird) with a text widget. When I enter text in the widget I want to disable the global accelerator and have space behave "normally".

How do I do that?

I'm thinking about catching focus in/out events for the search widget and disable/enable the accelerator there. I've also tried catching the key_press event and , returning TRUE to stop further handling of the key and also using g_signal_stop_emission_by_name, but to no avail.

I've also tried using gtk_widget_remove_accelerator for that specific search widget, but no luck there either...

What strategy is best to use for this and how do I implement it?

Niklas



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