On Mon, 7 May 2007 09:22:26 +1000, "Neil Hodgson"
<[EMAIL PROTECTED]> wrote:
> Enrico Tröger:
>
> > in ScintillaGTK.cxx:313 there is a "text/uri-list" clipboard target
> > defined. But unfortunately, this causes OpenOffice to interpreted
> > pasted text(which was copied within a Scintilla widget) to handle
> > it as an URI instead of plain text(it opens a "Insert Section"
> > dialog). Maybe there are other applications which mishandle the
> > contents of the clipboard by this target. Removing the target from
> > the list solves the problem.
> >
> > So, why is the uri-list target there? In general, the copied content
> > should be plain text, shouldn't it?
>
> Scintilla receives dropped files on behalf of the application as
> text/uri-list. Perhaps there should be separate target lists for copy
> and for paste.
Of course, I should have checked this. So, I created a patch to have
different target lists for copy and for paste.
Regards,
Enrico
Index: gtk/ScintillaGTK.cxx
===================================================================
RCS file: /cvsroot/scintilla/scintilla/gtk/ScintillaGTK.cxx,v
retrieving revision 1.171
diff -r1.171 ScintillaGTK.cxx
312c312,318
< static const GtkTargetEntry clipboardTargets[] = {
---
> static const GtkTargetEntry clipboardCopyTargets[] = {
> { "UTF8_STRING", 0, TARGET_UTF8_STRING },
> { "STRING", 0, TARGET_STRING },
> };
> static const gint nClipboardCopyTargets = sizeof(clipboardCopyTargets) / sizeof(clipboardCopyTargets[0]);
>
> static const GtkTargetEntry clipboardPasteTargets[] = {
317c323
< static const gint nClipboardTargets = sizeof(clipboardTargets) / sizeof(clipboardTargets[0]);
---
> static const gint nClipboardPasteTargets = sizeof(clipboardPasteTargets) / sizeof(clipboardPasteTargets[0]);
765c771
< clipboardTargets, nClipboardTargets);
---
> clipboardPasteTargets, nClipboardPasteTargets);
769c775
< clipboardTargets, nClipboardTargets);
---
> clipboardPasteTargets, nClipboardPasteTargets);
773c779
< GTK_DEST_DEFAULT_ALL, clipboardTargets, nClipboardTargets,
---
> GTK_DEST_DEFAULT_ALL, clipboardPasteTargets, nClipboardPasteTargets,
1268c1274
< gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets,
---
> gtk_clipboard_set_with_data(clipBoard, clipboardCopyTargets, nClipboardCopyTargets,
1290c1296
< gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets,
---
> gtk_clipboard_set_with_data(clipBoard, clipboardCopyTargets, nClipboardCopyTargets,
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest