[Sugar-devel] Activity title update

Bernie Innocenti bernie at codewiz.org
Sun Jul 4 11:08:47 EDT 2010


El Fri, 02-07-2010 a las 08:36 +0000, Sascha Silbe escribió:

> FWIW, in an unrelated project I'm using the "changed" signal and have not
> noticed any missing updates so far (except for SpinButtons which should
> have been fixed in GTK by now IIRC).

The "changed" signal fires on each keystroke. We can't use this event
directly, because updating metadata in the datastore causes a ~1sec
freeze on slow hardware such as the XO-1. Also, probably due to event
ping-pong, the cursor gets reset to the beginning of the edit-field and
all interim keystrokes end up in the wrong position.

The old approach was to listen for "changed" with a 1-second timeout to
trigger the metadata update. The timeout logic was also buggy, which is
what the patch applied in git fixes.

I can't believe GTK wouldn't offer a reliable way to tell when a user
has finished changing an edit widget.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/



More information about the Sugar-devel mailing list