Lost input in quickfill cells due to race

Christian Stimming christian at cstimming.de
Tue May 24 15:04:56 EDT 2011


Am Dienstag, 24. Mai 2011 schrieb Jim Paris:
> Jim Paris wrote:
> > Setting the selection can't be done asynchronously like this.
> > I'll see if I can come up with a clean fix...
> 
> No luck coming up with anything yet.  I can add some hacks, like
> storing the selection region separately and having the callers always
> do gtk_editable_select_region after gtk_editable_insert_text, but
> that's not very clean.  Another option might be to remove the custom
> quickfill code and switch to GtkEntryCompletion, but that's very
> invasive and involved.  Any suggestions?

In the long run, we should probably switch to GtkEntryCompletion.

As an intermediate solution, I think it would be fine if you add some 
intermediate data that ensures the timeout callback does not drop any 
characters that appeared in the meantime. Like, can the callback data also 
store the current position and verify it hasn't changed when it is run? If it 
had changed (i.e. additional characters have been received), the callback 
should just do nothing.

Regards,

Christian


More information about the gnucash-devel mailing list