Hi, I have a proposal to implement validation for entry widgets such as GtkEntry, GtkSpinbutton and GtkCombo. I have attached a description of the proposal, a patch which is against gtk+-2.2.0 and a test program that demonstrates the approach I have taken. Here is a short summary : The approach that I have taken is to allow the developer to install a validation callback on a GtkEntry widget. When the focus enters the GtkEntry widget, validation is marked as pending for that widget if the developer has installed a callback. When an event arrives that would have caused the focus to leave the GtkEntry {button press or tab key}, the validation callback is called if there is one installed. If the validation fails then the event is ignored so that the focus does not leave the GtkEntry. If the validation passes then the event is propagated in the normal way. Regards, Scott.
Attachment:
EntryValidationProposal.tar.bz2
Description: application/bzip