[Sugar-devel] [PATCH sugar-toolkit] fix regressions introduced by 29582de67f3189d232e170b1e07e9bf34233fb51

Simon Schampijer simon at schampijer.de
Wed Mar 23 11:54:22 EDT 2011


Hi Sascha,

thanks for looking into this!

On 03/03/2011 08:42 AM, Sascha Silbe wrote:
> GTK pops down the palette before it invokes the actions on the
> menu item. We need to postpone destruction of the palette until
> after all signals have propagated from the menu item to the
> palette owner.
>
> Signed-off-by: Sascha Silbe<silbe at activitycentral.com>

Acked-by: Simon Schampijer <simon at laptop.org>

> ---
>
> I don't really consider this a good solution (we now potentially race
> with other idle tasks), but cannot come up with anything better. Of the
> few existing idle_add calls that are related to palettes in some way
> none accesses the palette in the idle task, so we should be safe for
> now.

Yeah I poked a bit more around today (check if we could force that the 
gobject signalling had happened before we destroy the palette) but could 
not come up with anything better than the idle_add.

One thing we could consider is setting the priority to 
gobject.PRIORITY_LOW [1].

And maybe we should add the ticket id in your comment for further 
reference (or at least in the secondary commit message).

Regards,
    Simon

[1] 
http://www.pygtk.org/pygtk2reference/gobject-constants.html#gobject-priority-constants


More information about the Sugar-devel mailing list