Author Topic: The 11 February 2008 build (4872) is out.  (Read 27046 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2208
Re: The 11 February 2008 build (4872) is out.
« Reply #15 on: February 17, 2008, 04:14:46 pm »
...
I see a little problem remaining: copy/paste using middle click works ok now, but using keyboard (ctrl-c/ctrl-v) doesn't work correctly if you copy from inside CB to CB itself or any other app.
Do you think it can be solved?

It seems wxWidgets cannot handle two clipboards simultaneously. It can hold/advertise data for the "PRIMARY" (selected text) clipboard, or for the "CLIPBOARD" (ctrl-c/ctrl-v) normal clipboard, but not for both.

The effect is: if the pgm puts data in one, it clears the other.

So, it looks like we need some direct help from GTK.

I'm exploring the situation.
 

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2208
Re: The 11 February 2008 build (4872) is out.
« Reply #16 on: February 17, 2008, 07:33:06 pm »
...
I see a little problem remaining: copy/paste using middle click works ok now, but using keyboard (ctrl-c/ctrl-v) doesn't work correctly if you copy from inside CB to CB itself or any other app.
Do you think it can be solved?

Ok, here's MouseSap005.zip.
http://www.savefile.com/files/1386282

We now do a sneak run around wxWidgets in order to preserve both the PRIMARY and CLIPBOARD clipboards.

For Linux: when a window loses focus, the selection is handed off to  the GTK PRIMARY clipboard, leaving wxWidgets to handle the normal clipboard.

For windows, if the user middle-clicks inside the selection, it's copied to the clipboard.
For Linux, it's copied to the PRIMARY clipboard.

If the user clicks in an editor, if there is a selection, it's pasted at the current cursor location. If there is no selection, the clipboard text is pasted.
For Linux, same as above, but, if no selection, the PRIMARY is pasted.


« Last Edit: February 17, 2008, 07:38:30 pm by Pecan »

Offline sika

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: The 11 February 2008 build (4872) is out.
« Reply #17 on: February 18, 2008, 08:24:54 am »
Great! :D
Just a little detail: If you select something in CB then select something else in another app (or another file in CB), if you try to paste inside CB, it is the text selected in CB (in the same file) that will be pasted.
I think it should be the latest selection that should be pasted?
Anyway, everything else works fine.