Arjan Molenaar wrote:
>Hi all,
>
>I'm having some trouble displaying a menubar that is generated by an
>ItemFactory. Since my last update (this morning, first update since
>about two weeks), no menubar is displayed on top of my app. I checked
>the PyGtk demo app (item factory) and it doesn't show the menubar too.
>If I start the itemFactory demo as stand-alone app the menu is displayed
>though...
>
>From the ChangeLog I can't figure out what's wrong (my guess is it has
>to do with sinking widgets).
>
>
Looks like this was caused by some reference leak fixes. When the item
factory goes out of scope, it gets destroyed, and all the items it
created go with it.
The simple fix is to add the line:
win.item_factory = item_factory
I am still looking into whether we are supposed to own the return value
of gtk_item_factory_new() (while fixing the problem that caused this
one, it exposed the fact that you don't own the return value of
gtk_window_new(), so this could be similar).
James.
--
Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/