[pygtk] Popup a menu on drag_motion on a tray.
Gabriel Pettier
gabriel.pettier at gmail.com
Tue Feb 27 06:40:37 WST 2007
Hello,
I'm new to pygtk (and gtk itself) and I want to popup a menu out of a
tray on a drag action, to drop on a MenuItem. I managed to create a tray
and to popup a list on a button-press-event, but the same with a
drag_motion event doesn't work. (I read pygtk doc, googlized some time
and searched for subject about "tray" in this mailing list archive and
could not find a solution).
this works (my menu appear):
def on_clic(widget, context, contactList):
contactList.popup(None, None, None, 0, gtk.get_current_event_time())
this doesn't (a "print 'hello'" placed in the fonction will appear):
def on_drag(widget, context, x, y, time, contactList):
contactList.popup(None, None, None, 0, gtk.get_current_event_time())
event are connected this way:
eventbox.connect("button-press-event", on_clic, contactList)
eventbox.connect("drag_motion", on_drag, contactList)
If this is a normal behaving, maybe someone can point me a better
direction on how to achieve my effect :).
thanks in advance.
More information about the pygtk
mailing list