[pygtk] Adding menu items at runtime

Johannes Bauer dfnsonfsduifb at gmx.de
Wed Jun 3 19:01:44 WST 2009


Hello list,

I have a Pyton application which reads in some plugins and needs to add
items to a "plugins" menu accordingly at runtime. Now I expected to to a
builder/get for the MenuItem parent entry and then use "add" (as
MenuItem inherits from Bin).

But - weird: Although in the glade-File I see my "Plugins_MenuItem" as
of type "GtkMenuItem", in the generated XML it is of type "GtkAction"
(and is so also during runtime). I cannot add children to a GtkAction,
however...

So what should I do?

THanks in advance,
Kind regards,
Johannes


More information about the pygtk mailing list