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
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/