From: Jim Procter Date: Thu, 23 May 2013 10:57:02 +0000 (+0100) Subject: JAL-381 Desktop.addInternalFrame cannot be called in headless mode X-Git-Tag: Jalview_2_9~249^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b8a88837ea01a9c6cfdde8bfa160d646eae5dbfe;p=jalview.git JAL-381 Desktop.addInternalFrame cannot be called in headless mode --- diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 975a1a3..6f07b69 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -322,9 +322,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 {