[ENH] Making Squeak use the Unix clipboard properly
Ned Konz
ned at bike-nomad.com
Fri Apr 12 16:02:51 UTC 2002
On Thursday 11 April 2002 02:46 pm, Bert Freudenberg wrote:
> On Thu, 11 Apr 2002, Ned Konz wrote:
> > Bert suggested making clipboard text *from* Squeak be available
> > as both PRIMARY and CLIPBOARD, and copying only the PRIMARY *to*
> > Squeak.
> >
> > Since this seemed reasonable to me, I did it.
>
> Great! I committed that to SF.
Unfortunately, it still doesn't do the right thing. Perhaps others
have an idea.
The problem is that it is possible to put something in the CLIPBOARD
that was never in PRIMARY. For instance, I can right-button your name
in my mail reader and choose "copy to clipboard". Or I can copy a URL
from my browser. In neither case does PRIMARY get touched; only
CLIPBOARD gets set.
Alas, unless Squeak owned the CLIPBOARD selection, it never gets
notified that the selection there has changed (and that happens only
indirectly through a SelectionClear event).
Likewise, we can't tell how fresh the selections are. We can query for
owners of the CLIPBOARD and/or PRIMARY, but then we'd have to prefer
one over the other (perhaps CLIPBOARD) if they were both set. The
problem with this is that if you had a prior CLIPBOARD set from
another app that wasn't from a selection you'd always get it until
you copied from Squeak.
Or we could get both selections, compare them, and append them if they
weren't the same (but this could be a mess).
I could see making a commandline switch to specify which selection is
preferred; in my system there is little use for PRIMARY any more.
Interestingly, in the Konsole terminal program, it seems to do an
automatic copy to CLIPBOARD when you make a selection. Though this is
ugly, it works with the rest of KDE/Qt3.0.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|