[pygtk] cut and past in a text view

Mike Bernson mike at mlb.org
Thu Feb 14 09:50:52 WST 2008


my normal cut a past using the button on the mouse work the way i would except. If I cut something it is moved to
the PRIMARY and then other program can past that text. Also if another program cut text using the mouse it can be
pasted using the middle mouse button.

The part that is not working is using the menus to cut and past. This should move the text on to CLIPBOARD and then
other program using the copy/cut/paste should have access to text. Also other programs that put text on CLIPBOARD
should be pasted by using the paste option from the copy/cut/paste menu.

I have written a small program to watch the  PRIMARY and CLIPBOARD. I can set the mouse button doing the
correct thing but the menu does not put anything into the CLIPBOARD. If i use another program copy/cut/paste
menu I can see the CLIPBOARD getting the text. Also I do see the text getting into PRIMARY when I select a
text to be copy and when I hit the copy button it set the PRIMARY to NONE but does not set the CLIPBOARD.

What need to be set to make the copy/cut/paste menu work with the CLIPBOARD ?




More information about the pygtk mailing list