A Qui, 2004-04-08 Ãs 16:25, Jakub Piotr CÅapa escreveu:
> Gustavo J. A. M. Carneiro wrote:
> > A Qua, 2004-04-07 Ãs 20:58, Jakub Piotr CÅapa escreveu:
> > 
> >>Why are this two different? It is mentioned in FAQ 10.13 that nobody 
> >>alive knows this but maybe there is one who knows?
> >>
> >>I've found out that returning True doesn't stop button_press_event from 
> >>propagating. I wanted jump to another entry in a TreeView when the user 
> >>selected sth from the popup menu but it didn't work because of TreeView 
> >>interpreting my 'popuping click' also as a 'selecting click'. However, 
> >>when I executed trv.emit_stop_by_name ('button_press_event'), it worked 
> >>perfectly. What's up?
> > 
> > 
> >   You must be doing something really weird with your popup menu. 
> > Usually, gtk.Menu.popup() grabs the keyboard and pointer, completely
> > avoiding the problem you described.
> >   I just tried it, and return True in button-press-event works just
> > fine.
> >   Regards.
> I click on one row and in the event handler (which is running a nested 
> main_loop ending with popup menu deactivation, maybe this is the cause?) 

  Yeah, running a nested event loop just to popup a menu is evilâ. 
What's wrong with menuitem.connect("activate", callback) and
menu.popup(...) ?

> I set_cursor to another one. Nevertheless the cursor gets back to the 
> one I clicked on unless I add emit_stop_by_name. Are you sure it is 
> working for you?

  I'm sure it works, but I only have one main loop.

-- 
Gustavo JoÃo Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
The universe is always one step beyond logic.

_______________________________________________
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