From: Ben Soares Date: Wed, 8 May 2019 16:33:45 +0000 (+0100) Subject: JAL-3247 JAL-3254 Getdown now opening any files thrown at it by a file-association... X-Git-Tag: Release_2_11_0~12^2^2~5 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=992f8de4d39d69eca640746b5126aae1d62685cc JAL-3247 JAL-3254 Getdown now opening any files thrown at it by a file-association double-click --- diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index a72da96..1f38352 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java index b6ae55d..4d75236 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java @@ -1061,10 +1061,10 @@ public class Application if (j > -1) { ext = filename.substring(j+1); } - if (startupFileExtensions.contains(ext.toLowerCase())) { + if (locatorFileExtension.equals(ext.toLowerCase())) { + // this file extension should have been dealt with in Getdown class + } else { _appargs.add(0, "-open"); - } else if (locatorFileExtension.equals(ext.toLowerCase())) { - // deal with this when first encountered in Getdown! } } @@ -1869,6 +1869,5 @@ public class Application protected static final String ENV_VAR_PREFIX = "%ENV."; protected static final Pattern ENV_VAR_PATTERN = Pattern.compile("%ENV\\.(.*?)%"); - public static final List startupFileExtensions = Arrays.asList(new String[] { "jvp" }); public static final String locatorFileExtension = "jvl"; } diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java index 7269c85..f87382a 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java @@ -1054,15 +1054,6 @@ public abstract class Getdown extends Thread if (j > -1) { ext = filename.substring(j+1); } - // jvp files etc - boolean addedStartupFile = false; // only add one startup file - if (_app.startupFileExtensions.contains(ext.toLowerCase()) && ! addedStartupFile) { - File f = new File(filename); - if (f.exists()) { - _app.addStartupFile(f); - addedStartupFile = true; - } - } // jvl files if (_app.locatorFileExtension.equals(ext.toLowerCase())) { // Do something special with this here @@ -1088,6 +1079,16 @@ public abstract class Getdown extends Thread } } } + } else { + // jvp files etc + boolean addedStartupFile = false; // only add one startup file + if (! addedStartupFile) { + File f = new File(filename); + if (f.exists()) { + _app.addStartupFile(f); + addedStartupFile = true; + } + } } } } diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java index 32890fa..42dca17 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java @@ -98,7 +98,7 @@ public class GetdownApp @Override public void startupPerformed(String parameters) { - GetdownApp.setStartupFilesParameterString(parameters); + setStartupFilesParameterString(parameters); } }); } catch (Exception e)