berkus / enso

Automatically exported from code.google.com/p/enso
Other
1 stars 0 forks source link

pygtk clipboard set_text not working #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. select an expression e.g. "2*3"
2. trigger "evaluate" command

What is the expected output?
The selected expression should be evaluated and overwritten. Example above: "6"

What do you see instead?
After triggering the evaluate command the selection is gone leaving the
expression unchanged. Example above: "2*3"

What version of the product are you using?
enso trunk revision 103

On what operating system?
Linux (Gentoo), Xfce

additional information:
The problem here is the set_text function of the pygtk clipboard object.
Nothing is in the clipboard after enso_linux/selection.py:121
    clipboard.set_text (seldict["text"])

The xclipboard utility gives a hint (not for me, though!) what could be the
problem here. After the set_text call, xclipboard shows the following error:
    CLIPBOARD selection conversion failed

Following lines produce the same xclipboard error directly
    import gtk
    clipboard=gtk.clipboard_get(selection="CLIPBOARD")
    clipboard.set_text("6")

P.S.: Normal Copy&Paste operations work as expected on my system.

Original issue reported on code.google.com by marius.h...@gmail.com on 21 Mar 2008 at 11:37

GoogleCodeExporter commented 9 years ago
Added labels

Original comment by ebj...@gmail.com on 22 Mar 2008 at 12:01

GoogleCodeExporter commented 9 years ago
Here's a patch which, I think, fixes this issue. It adds a new dependency on the
XTEST X server module, which seems to be there by default on my Ubuntu hardy 
system.
I don't know whether it's there on others.

Original comment by stuart.l...@gmail.com on 6 Jul 2008 at 8:53

Attachments:

GoogleCodeExporter commented 9 years ago
Applied on community branch.

Original comment by stuart.l...@gmail.com on 22 Aug 2008 at 6:31