From ed40d4099e7ff3d4738efac717ed6d6a5f0881ec Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 30 Jun 2009 12:12:34 +0000 Subject: [PATCH] * make Multi-File DnD work on Linux --- source/net/sourceforge/filebot/ui/MainFrame.java | 2 +- .../sourceforge/filebot/ui/transfer/FileTransferable.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/MainFrame.java b/source/net/sourceforge/filebot/ui/MainFrame.java index 1d8c6778..9197bc73 100644 --- a/source/net/sourceforge/filebot/ui/MainFrame.java +++ b/source/net/sourceforge/filebot/ui/MainFrame.java @@ -92,7 +92,7 @@ public class MainFrame extends JFrame { } }); - setSize(760, 615); + setSize(760, 630); } diff --git a/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java b/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java index eb92ae82..28b72f13 100644 --- a/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java +++ b/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java @@ -6,6 +6,7 @@ import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.io.File; +import java.nio.CharBuffer; import java.util.Arrays; import java.util.Collection; @@ -17,7 +18,7 @@ public class FileTransferable implements Transferable { private static DataFlavor createUriListFlavor() { try { - return new DataFlavor("text/uri-list;class=java.lang.String"); + return new DataFlavor("text/uri-list;class=java.nio.CharBuffer"); } catch (ClassNotFoundException e) { // will never happen throw new RuntimeException(e); @@ -43,7 +44,7 @@ public class FileTransferable implements Transferable { if (flavor.isFlavorJavaFileListType()) return Arrays.asList(files); else if (flavor.equals(uriListFlavor)) - return getUriList(); + return CharBuffer.wrap(getUriList()); else throw new UnsupportedFlavorException(flavor); }