[pygtk] gtk.ComboBoxEntry and "changed" event on keystrokes.

Osmo Maatta osmoma at gmail.com
Tue Mar 30 21:09:42 WST 2010


Hello,

I have a small application that has a search-field (gtk.ComboBoxEntry) 
and a button to start a search job.

The application will start a new search if user:
1) Selects an item from the gtk.ComboBoxEntry's drop-down list.
     This is handled by gtk.ComboBoxEntry's "changed" event. This is Ok.

2  Types a search query (some text) and presses the [Start search] button.
     This is handled by the button's "clicked" event. This is Ok.

3) Presses the [Enter]-key.
     This is handled by the combo's "activate" event attached to the 
gtk.Entry. This is Ok.

Because a search-job can take quite a long time, I do not want to 
activate search for each keystroke, when user types text in the search 
field.  And this is my problem. Key-strokes activate the "changed" event 
on the gtk.ComboBoxEntry field. I cannot distinguish between the 
drop-down list's "changed" event (which I want) and the "changed" event 
when user types text (I try to avoid this event).

User is welcome to type in some text/query and press the [Start search] 
button. This is OK.

So how to avoid "changed" event on each keystroke?

A simplified but complete example: http://www.futuredesktop.com/tmp/w4.py

Happy Easter,
   Moma Antero
   Grønland

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20100330/64eff157/attachment.htm 


More information about the pygtk mailing list