X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFileLoader.java;h=5f53579333b4dc4a4609e2aba0f94a712da1c9d6;hb=cab9f54d732ed7b127140efd5f3b923accd10eb4;hp=86c1cf4cc139ed5790de492c951682bd5842fe6c;hpb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;p=jalview.git diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 86c1cf4..5f53579 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -117,7 +117,7 @@ public class FileLoader jalview.bin.Cache.setProperty(type, newHistory.toString()); - if (type.equals(FormatAdapter.FILE)) + if (protocol.equals(FormatAdapter.FILE)) { jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", format); } @@ -125,6 +125,9 @@ public class FileLoader public void run() { + String title = protocol.equals(AppletFormatAdapter.PASTE) + ? "Copied From Clipboard" : file; + try { if (Desktop.instance != null) @@ -172,10 +175,12 @@ public class FileLoader AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); - alignFrame.statusBar.setText("Successfully loaded file " + file); - alignFrame.setFileName(file, format); + alignFrame.statusBar.setText("Successfully loaded file " + title); + + if (!protocol.equals(AppletFormatAdapter.PASTE)) + alignFrame.setFileName(file, format); - Desktop.addInternalFrame(alignFrame, file, + Desktop.addInternalFrame(alignFrame, title, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); @@ -196,7 +201,7 @@ public class FileLoader Desktop.instance.stopLoading(); } - final String errorMessage = "Couldn't load file " + file + "\n" + + final String errorMessage = "Couldn't load file " + title + "\n" + error; javax.swing.SwingUtilities.invokeLater(new Runnable()