Артём Попов skrev:
Never mind, I've just figured out that a __gtype_name__ line needs to
be added and everything then works as expected. This is a working
version:

class MenuToolAction(gtk.Action):
   __gtype_name__ = "MenuToolAction"
MenuToolAction.set_tool_item_type(gtk.MenuToolButton)

But I'm still wondering, why the first version did not work? Isn't
__gtype_name__ set automatically nowadays?
A GType is not automatically registered for a GObject subclass.
You can either register it manually by calling gobject.type_register() or
automatically by setting a property, signal or a name.

Johan

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to