1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* make Multi-File DnD work on Linux

This commit is contained in:
Reinhard Pointner 2009-06-30 12:12:34 +00:00
parent 6a750cb95d
commit ed40d4099e
2 changed files with 4 additions and 3 deletions

View File

@ -92,7 +92,7 @@ public class MainFrame extends JFrame {
}
});
setSize(760, 615);
setSize(760, 630);
}

View File

@ -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);
}