From: jprocter Date: Wed, 17 Aug 2011 10:57:54 +0000 (+0100) Subject: JAL-898 - ensure we only remove a clargs progress bar if we added it X-Git-Tag: Release_2_7~105 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6f5064fe39dbf67f92b51e56b0554e016b7e0b00;p=jalview.git JAL-898 - ensure we only remove a clargs progress bar if we added it --- diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 5357e81..aae30b5 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -318,9 +318,14 @@ public class Jalview } } } + long progress=-1; // Finally, deal with the remaining input data. if (file != null) { + if (!headless) + { + desktop.setProgressBar("Processing commandline arguments...", progress=System.currentTimeMillis()); + } System.out.println("Opening file: " + file); if (!file.startsWith("http://")) @@ -334,10 +339,6 @@ public class Jalview } } } - if (!headless) - { - desktop.setProgressBar("Processing commandline arguments...", Jalview.class.hashCode()); - } protocol = jalview.io.AppletFormatAdapter.checkProtocol(file); @@ -562,7 +563,9 @@ public class Jalview // and finally, turn off batch mode indicator - if the desktop still exists if (desktop != null) { - desktop.setProgressBar(null, Jalview.class.hashCode()); + if (progress!=-1) { + desktop.setProgressBar(null, progress); + } desktop.setInBatchMode(false); } }