X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileLoader.java;h=a8c60fdc7de572912973a7e73560a056512a90b3;hb=62a585da2d97f93123b5482f2b5846fdac3bd97f;hp=975a1a3c7d7a9b966c7239e8df49a6a408e444db;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 975a1a3..a8c60fd 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -23,6 +23,7 @@ import javax.swing.*; import jalview.datamodel.*; import jalview.gui.*; +import jalview.util.MessageManager; public class FileLoader implements Runnable { @@ -322,9 +323,14 @@ public class FileLoader implements Runnable if (!protocol.equals(AppletFormatAdapter.PASTE)) alignFrame.setFileName(file, format); - - Desktop.addInternalFrame(alignFrame, title, - AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); + if (raiseGUI) + { + // add the window to the GUI + // note - this actually should happen regardless of raiseGUI status in Jalview 3 + // TODO: define 'virtual desktop' for benefit of headless scripts that perform queries to find the 'current working alignment' + Desktop.addInternalFrame(alignFrame, title, + AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); + } try { @@ -351,7 +357,7 @@ public class FileLoader implements Runnable public void run() { JOptionPane.showInternalMessageDialog(Desktop.desktop, - errorMessage, "Error loading file", + errorMessage, MessageManager.getString("label.error_loading_file"), JOptionPane.WARNING_MESSAGE); } }); @@ -376,8 +382,8 @@ public class FileLoader implements Runnable public void run() { javax.swing.JOptionPane.showInternalMessageDialog( - Desktop.desktop, "Encountered problems opening " + file - + "!!", "File open error", + Desktop.desktop, MessageManager.formatMessage("label.problems_opening_file", new String[]{file}), + MessageManager.getString("label.file_open_error"), javax.swing.JOptionPane.WARNING_MESSAGE); } });