Christian Robottom Reis wrote:
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.
That seems like the answer. Modify the default popup menu in the
populate-popup signal handler. I suppose you could even remove all the
current menuitems and add your own.
John
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/