Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-10 Thread zeljko
On Saturday 10 of March 2012 14:56:52 cobines wrote: 2012/3/9 zeljko zel...@holobit.net: Good, then prepare patch and that's it :) My observation about openoffice IS about OpenOffice (not LibreOffice) maybe 2yrs ago, and probably gtk2 2.20 or something like that.Also when i said copy from

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-10 Thread cobines
2012/3/10 zeljko zel...@holobit.net: ok, let's back at beginning ... what problem is caused by trailing null terminator under gtk2 ? When assigning Clipboard.AsText := '1234'; and pasting to some programs (I only experience it with jEdit though), '1234'#0 is pasted, i.e., string of length 5

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-10 Thread zeljko
On Saturday 10 of March 2012 16:17:35 cobines wrote: 2012/3/10 zeljko zel...@holobit.net: ok, let's back at beginning ... what problem is caused by trailing null terminator under gtk2 ? When assigning Clipboard.AsText := '1234'; and pasting to some programs (I only experience it with

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-10 Thread cobines
I see it as: there's no problems when zero is not added, while there is problem when it is added. Why LCLQT cuts the zero then if adding it causes no problems? Why can't LCLGTK2 cut it as well? Incidentally I found that I don't need to use Clipboard.AsText, instead I can use this:

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread cobines
2012/3/8 zeljko zel...@holobit.net: We cannot remove it just because you think so. If it's removed we need to test consequences on gtk, gtk2 and qt. I know, I was counting on someone saying that it is needed and why. With copying to clipboard, I found this in LCLQT in

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread zeljko
On Friday 09 of March 2012 15:36:09 cobines wrote: 2012/3/8 zeljko zel...@holobit.net: We cannot remove it just because you think so. If it's removed we need to test consequences on gtk, gtk2 and qt. I know, I was counting on someone saying that it is needed and why. With copying to

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread cobines
2012/3/9 zeljko zel...@holobit.net: Yeah, just try to copy something from openoffice under X11 and paste it into qt application (or to win32 app running under wine) and you'll see problem (and that comes from gtk2). My wild guess is that #0 was added because of gtk2. I'll fix qt in any case

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread zeljko
On Friday 09 of March 2012 19:00:29 cobines wrote: 2012/3/9 zeljko zel...@holobit.net: Yeah, just try to copy something from openoffice under X11 and paste it into qt application (or to win32 app running under wine) and you'll see problem (and that comes from gtk2). My wild guess is

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread Felipe Monteiro de Carvalho
2012/3/9 zeljko zel...@holobit.net: I'll fix qt in any case ... .whatever you put at the end, but who will fix gtk2 or carbon ? I have never seen this final #0 problem in Carbon -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-09 Thread zeljko
On Saturday 10 of March 2012 07:34:11 Felipe Monteiro de Carvalho wrote: 2012/3/9 zeljko zel...@holobit.net: I'll fix qt in any case ... .whatever you put at the end, but who will fix gtk2 or carbon ? I have never seen this final #0 problem in Carbon ok, then gtk/gtk2 should be tested. --

[Lazarus] Setting clipboard on Linux adds ending #0

2012-03-08 Thread cobines
Hello. Putting a string to a clipboard is done in TClipboard.SetAsText(): SetBuffer(PredefinedClipboardFormat(pcfText),s[1],length(Value)+1); Note that there is length(Value)+1, ending zero included. This comes from the following revision: r7259 | vincents | 2005-06-21 13:42:35 +0200 (wto) |

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-08 Thread zeljko
On Thursday 08 of March 2012 18:01:14 cobines wrote: Hello. Putting a string to a clipboard is done in TClipboard.SetAsText(): SetBuffer(PredefinedClipboardFormat(pcfText),s[1],length(Value)+1); Note that there is length(Value)+1, ending zero included. This comes from the following

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-08 Thread Hans-Peter Diettrich
zeljko schrieb: We cannot remove it just because you think so. If it's removed we need to test consequences on gtk, gtk2 and qt. Why do you think that an additional #0 should be added, if not required? DoDi -- ___ Lazarus mailing list

Re: [Lazarus] Setting clipboard on Linux adds ending #0

2012-03-08 Thread zeljko
On Thursday 08 of March 2012 21:01:51 Hans-Peter Diettrich wrote: zeljko schrieb: We cannot remove it just because you think so. If it's removed we need to test consequences on gtk, gtk2 and qt. Why do you think that an additional #0 should be added, if not required? I didn't say so. I