[Sugar-devel] Activity title update
quozl at laptop.org
Tue Jul 6 05:30:52 EDT 2010
On Tue, Jul 06, 2010 at 11:05:34AM +0200, Tomeu Vizoso wrote:
> On Mon, Jul 5, 2010 at 17:57, Bernie Innocenti <bernie at codewiz.org> wrote:
> > On Mon, 2010-07-05 at 16:37 +0200, Tomeu Vizoso wrote:
> >> But you can do the same with Gtk+, cannot you?
> >> "This signal is emitted when the Return or Enter key is pressed or the
> >> line edit loses focus"
> > No, GTK does not seem to send a "focus-out-event" when the user clicks
> > on the close button. Which is what makes my approach fail.
> Ok, that's quite different from what I read initially.
> Have made a little test that seems to show that when the user clicks
> on a button and a text field had the focus, the focus is moved from
> the field to the button and thus focus-out-event is emitted:
I've tested this fragment on F11 for XO-1.5, and I agree, it does seem
to be working fine. I added a changed callback, and as far as I can
tell a metadata update could be deferred until changed plus a delta
time, or focus-out, whichever occurs first.
def focus_in_event_cb(entry, event):
def focus_out_event_cb(entry, event):
w = gtk.Window()
hbox = gtk.HBox()
e = gtk.Entry()
b = gtk.Button('mec')
More information about the Sugar-devel