On Wed, Jun 16, 2004 at 12:00:44PM -0500, Dennis Craven wrote: > On Wed, 2004-06-16 at 09:59, Thomas Mills Hinkle wrote: > > On Wed, 16 Jun 2004 08:35:18 -0500 Dennis Craven <[EMAIL PROTECTED]> > > wrote: > > > > > How would one go about disabling the default popup that is associated > > > with the TextView altogether? I've made my own now, and both are > > > appearing on right-click. hehe > > > > I think making your callback (whatever is attached to the > > "button-press-event" signal or equivalent) return gtk.TRUE should > > prevent the click from doing it's normal thing. > > You are correct. However, now I've also lost the ability to select text > with the mouse. I suppose I'll either have to figure out how to > implement that functionality myself,
No; in reality, you only want to block the event *if* it's a right-click. Left-clicks should go through as usual. > or figure out how to manipulate (read: get a reference to) the default > right-click menu so that I can alter it's functionality/add to it. That's something that sounds more promising -- or less of a hack. I'm trying to find out how you'd get hold of that menu, however. The only thing that mentions it in the reference is a populate-popup signal. In the C source it is apparent that the popup_menu attribute of the text_view holds a reference to it, but I don't think it's exposed via PyGTK, which means either prodding people to explain why or writing a C extension hack that exposes it for you. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
