Merge branch 'features/1769_headless-mode-test' into develop
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 6 Jul 2015 16:01:28 +0000 (17:01 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 6 Jul 2015 16:01:28 +0000 (17:01 +0100)
1  2 
src/jalview/gui/AlignFrame.java

@@@ -37,6 -37,7 +37,7 @@@ import jalview.api.SplitContainerI
  import jalview.api.ViewStyleI;
  import jalview.api.analysis.ScoreModelI;
  import jalview.bin.Cache;
+ import jalview.bin.Jalview;
  import jalview.commands.CommandI;
  import jalview.commands.EditCommand;
  import jalview.commands.EditCommand.Action;
@@@ -335,7 -336,10 +336,10 @@@ public class AlignFrame extends GAlignF
     */
    void init()
    {
-     progressBar = new ProgressBar(this.statusPanel, this.statusBar);
+     if (!Jalview.isHeadlessMode())
+     {
+       progressBar = new ProgressBar(this.statusPanel, this.statusBar);
+     }
  
      avc = new jalview.controller.AlignViewController(this, viewport,
              alignPanel);
        {
          warningMessage("Cannot save file " + fileName + " using format "
                  + format, "Alignment output format not supported");
-         saveAs_actionPerformed(null);
-         // JBPNote need to have a raise_gui flag here
+         if (!Jalview.isHeadlessMode())
+         {
+           saveAs_actionPerformed(null);
+         }
          return false;
        }
  
  
              // temporary flag until SplitFrame is released
              boolean asSplitFrame = Cache.getDefault(
 -                    Preferences.ENABLE_SPLIT_FRAME, false);
 +                    Preferences.ENABLE_SPLIT_FRAME, true);
              if (asSplitFrame)
              {
                /*
                "label.translation_of_params", new Object[]
                { this.getTitle() });
        af.setTitle(newTitle);
 -      if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
 +      if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
        {
          final SequenceI[] seqs = viewport.getSelectionAsNewSequence();
          viewport.openSplitFrame(af, new Alignment(seqs),