Awn

Comment 18 for bug 156697

Revision history for this message
Michal Hruby (mhr3) wrote :

Hey, I'd like to revisit this issue, I really don't like that set_temp_icon touches and frees!!! the parameter which an applet passes in, in fact I think that this could in some cases crash an applet - because python will automatically unref the pixbuf if it can(it's no longer used), but if it was passed previously to this function it tries to unref and already freed object, and IMO this may lead to a crash.

I suggest marking the set_temp_icon as deprecated and making it do the same as set_icon does -> make a copy of the passed pixbuf and use it, but without the unrefing of the original pixbuf.

Yes, this might cause leaks for applets which already count on the fact that set_temp_icon frees the pixbuf, but that would only apply to applets written in C that use set_temp_icon. Are there such applets?