Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

Synedit requesting strange format from clipboard

7 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

It was reported in the MSEide mailing list that copying text from MSEide and trying to paste it into Lazarus Source Editor (synedit) doesn't work. Martin had a look at the issue and found the following.

Could anybody explain the strange text format requested by SynEdit?

------------------------------------
MSEide offers "UTF8_STRING", "COMPOUND_TEXT", "STRING" and "TEXT" (trunk 3560 has additionally "text/plain"), surprisingly Lazarus requests "Application/X-Laz-SynEdit-Tagged" which MSEgui can't provide. Copying from MSEide into Lazarus edit widgets works. Can you check why Lazarus requests "Application/X-Laz-SynEdit-Tagged" in source editor? -------------------------------------

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 12 lines
Hi, It was reported in the MSEide mailing list that copying text from MSEide and trying to paste it into Lazarus Source Editor (synedit) doesn't work. Martin had a look at the issue and found the following. Could anybody explain the strange text format requested by SynEdit? ------------------------------------ MSEide offers "UTF8_STRING", "COMPOUND_TEXT", "STRING" and "TEXT" (trunk 3560 has additionally "text/plain"), surprisingly Lazarus requests "Application/X-Laz-SynEdit-Tagged" which MSEgui can't provide.

Same for any non synedit control and any non lcl program and copying works.

Copying from MSEide into Lazarus edit widgets works. Can you check why Lazarus requests "Application/X-Laz-SynEdit-Tagged" in source editor?

It prefers that format because it supports selection mode. Apps are not bound to serve the request.
If this fails then synedit asks for the text.
I don't know why msegui does not work.

I added a check. Maybe this helps.

Mattias

Reply by email

Martin
to Graeme Geldenhuys: It was reported in the MSEide mailing list that copying text from MSEide and trying to…
Graeme Geldenhuys wrote 17 lines
Hi, It was reported in the MSEide mailing list that copying text from MSEide and trying to paste it into Lazarus Source Editor (synedit) doesn't work. Martin had a look at the issue and found the following. Could anybody explain the strange text format requested by SynEdit? ------------------------------------ MSEide offers "UTF8_STRING", "COMPOUND_TEXT", "STRING" and "TEXT" (trunk 3560 has additionally "text/plain"), surprisingly Lazarus requests "Application/X-Laz-SynEdit-Tagged" which MSEgui can't provide. Copying from MSEide into Lazarus edit widgets works. Can you check why Lazarus requests "Application/X-Laz-SynEdit-Tagged" in source editor? -------------------------------------

As Mattias explained the tagged format contains additional info, such as selection-mode (eg column selection) and folding. The format is also extentable for the future, if new features require info on the clipboard.

I am currently on holiday, and can't th problem
occur on all platforms/OS? Windows?

Martin

Reply by email

Hans-Peter Diettrich
to Graeme Geldenhuys: It was reported in the MSEide mailing list that copying text from MSEide and trying to…
Show quoted text 13 lines
It was reported in the MSEide mailing list that copying text from MSEide and trying to paste it into Lazarus Source Editor (synedit) doesn't work. Martin had a look at the issue and found the following. Could anybody explain the strange text format requested by SynEdit? ------------------------------------ MSEide offers "UTF8_STRING", "COMPOUND_TEXT", "STRING" and "TEXT" (trunk 3560 has additionally "text/plain"), surprisingly Lazarus requests "Application/X-Laz-SynEdit-Tagged" which MSEgui can't provide. Copying from MSEide into Lazarus edit widgets works. Can you check why Lazarus requests "Application/X-Laz-SynEdit-Tagged" in source editor? -------------------------------------

When the request for a special format fails, a client should request a more common format, e.g. UTF8_STRING, then STRING or TEXT.

I wonder why this works on Windows, but not on your OS.

DoDi

Reply by email

Graeme Geldenhuys
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 5 lines
When the request for a special format fails, a client should request a more common format, e.g. UTF8_STRING, then STRING or TEXT. I wonder why this works on Windows, but not on your OS.

That is how Martin understands it should work too, but for some reason the Lazarus Source Editor is not asking for other formats.

I don't really know Martin's code in MSEide&MSEgui so I don't know how he implemented it, but as far as I understand, he does follow the ICCCM guidelines.

Martin, myself and one other person tested under our various Linux distros
- not sure what Windows does.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gärtner
to Graeme Geldenhuys

Zitat von Graeme Geldenhuys :

Show quoted text 10 lines
Hans-Peter Diettrich wrote: > > When the request for a special format fails, a client should request a > more common format, e.g. UTF8_STRING, then STRING or TEXT. > > I wonder why this works on Windows, but not on your OS. That is how Martin understands it should work too, but for some reason the Lazarus Source Editor is not asking for other formats.

Of course it does. Otherwise copying would not work with any other applications. It works for example with gedit.

Show quoted text 6 lines
I don't really know Martin's code in MSEide&MSEgui so I don't know how he implemented it, but as far as I understand, he does follow the ICCCM guidelines. Martin, myself and one other person tested under our various Linux distros - not sure what Windows does.

Clipboard under X works very different than under Windows.

Mattias

Reply by email

Martin Schreiber
to Mattias Gaertner: On Fri, 26 Feb 2010 08:41:45 +0200 Same for any non synedit control and any non lcl…
Mattias Gaertner wrote 8 lines
> Copying from MSEide into Lazarus edit widgets works. Can you check why > Lazarus requests "Application/X-Laz-SynEdit-Tagged" in source editor? It prefers that format because it supports selection mode. Apps are not bound to serve the request. If this fails then synedit asks for the text. I don't know why msegui does not work.

MSEgui sets a wrong value into the time field of XSelectionEvent. Because most of the applications seem not to check this field it got unnoticed up to now. Fixed in MSEide+MSEgui trunk.
http://developer.berlios.de/svn/?group_id=11520

Thanks, Martin

Reply by email