Cut, Copy and Paste [was : Re: Some bugs...] - FIX

holle at almaden.ibm.com holle at almaden.ibm.com
Thu Oct 21 23:14:15 BST 1999



Awesome !!!

I like that. Maybe we can extend the KDE default menubar to have exactly this
functionality ? What about creating the kde application already with this
additional feature ?

- Holger


Richard Dale <Richard_Dale at tipitina.demon.co.uk> on 21/10/99 14:12:35

Please respond to kdevelop at barney.cs.uni-potsdam.de

To:   kdevelop at barney.cs.uni-potsdam.de
cc:
Subject:  Re: Cut, Copy and Paste [was : Re: Some bugs...] - FIX




I've been looking into how the Qt/KDE libs use the clipboard - they all use
XA_PRIMARY. I couldn't find any program which did anything with
the XA_SECONDARY buffer. I changed the two source files in Qt and KDE to use
'XA_SECONDARY' as a clipboard as an experiment - it still worked fine as long
as the apps were all using the hacked Qt/KDE libs (all the others were still
looking at XA_PRIMARY). But even after this fix, when text was selected, it was
still automatically copied to the clipboard (although XA_SECONDARY instead of
XA_PRIMARY).

So the solution was to change KDevelop - it has some code which automatically
copies the current selection to the clipboard when the mouse is released in the
editor. So here is a patch to kdevelop-1.0beta3 to make this behaviour optional.
I've added a new 'Auto Copy' option to the 'Options->Editor...' menu. If 'Auto
Copy Selection' is not enabled, then just selecting something will not copy it
to the clipboard. An item will only be copied with an explicit 'Edit->Copy' or
Ctrl+C command.

I've also fixed a bug in the code to replace the current selection with the
clipboard contents; the code was wrongly appending to the existing contents.

--snipp-- (rest cut away)





More information about the KDevelop mailing list