Hello everyone,
in my applications I have different tool widgets, very similar to the
dockable tools in gimp, and they all have a button at the top-right that
opens up a popup menu when pressed. This popup allows to add other
tools, so for this reason, the popup is always the same.
Unfortunately, this means that since every popup is the same, the
corresponding actions are always the same as well. There seems to be no
way to know from which tool instance the popup was called. So my
question is: Is there any way to add certain extra information when
popping up a menu, so that when an action is triggered, this extra
information is passed on to the callback ?
My current solution is rather ugly: Before calling menu.popup, I set a
global variable to hold this extra information, so that the callback can
retrieve it.
Niklas Volbers.
_______________________________________________
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/