CR added before every CRLF when copying in clipboard
Status: Beta
Brought to you by:
dtmoser
I'm using Diffuse 0.4.6 on Windows XP. When copying some text to the clipboard it is always copied with one additional carriage return before each CR-LF sequence, which determines at the moment of the paste one unwanted blank line before each line. I can't believe I'm the only one reporting it, I don't think it is something specific of my platform.
It happens both when copying from existing open files and when writing directly new text in a new "file merge".
You can see the effect by pasting anywhere and the fact that a single CR is added by pasting to an hex editor or with a clipboard contents viewer.
It looks like PyGTK on Windows mangles the clipboard data. I'll try to update Diffuse to work around the problem.
dtmoser, have you seen this?
https://bugzilla.gnome.org/show_bug.cgi?id=649390
There seems to be a patch, might it be applied to your distribution?
Thanks for pointing that out. Unfortunately, I have been relying on pre-built PyGTK packages for Windows as I have few Windows build tools. Getting access to a Windows C++ compiler will likely be a challenge (I doubt g++ under Cygwin will be sufficient).
I was actually able to use mingw32 cross-compiler in Fedora to build a patched GTK and confirm the patch in the linked gnome bugzilla is working, so it was merged upstream. And that even though I'm not a programmer and have only very basic programming knowledge. So cross-compiling is probably the best way to go for you (and once the update with the bugfix goes out, you don't have to actually build anything, the cross-compiler environment already contains all the libraries), though I had to copy the fedora mingw32 tree to Windows and do the py2exe part there, because I couldn't coerce the Windows Python to behave under Wine. Nice bonus is, that I now have recent GTK version, so my UI is no longer broken on Windows 7 (bug #12).
http://www13.zippyshare.com/v/65731358/file.html
^^
Installer of a fixed version using Python 2.7.5 and GTK 2.24.20.
I have also succeeded in using mingw32 under Fedora to cross-compile a patched version of GTK. Thanks for suggesting that! There was a problem with a missing intl.dll file which I fixed by copying libintl-8.dll. There was another problem loading the "diffuse.ico" file. I encountered a similar problem in the past when attempting to upgrade to a newer version of GTK. I think I can work around this by using a PNG file instead. The next release of Diffuse will use the patched GTK library.
There is now an official GTK3 release for Windows. So switching to GTK3/PyGObject is another possibility. Though it would require some porting work.
Diffuse 0.4.8 uses an updated version of the GTK on Microsoft Windows where this is fixed.