Re: How disable global accelerators for certain widgets?



On 2004-01-27 10:43, Niklas Morberg wrote:
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?

I'm sorry to be a PITA, but I'm having problems interpreting the lack of answers. Is this dead simple and clearly visible in the FAQ somewhere, or is it difficult and nobody knows what to do? Or maybe my question is phrased in a way making it impossible to understand? I'd be happy to provide more information if needed.

FWIW I have read the FAQ. More than once :)

Niklas



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