From: Ben Soares Date: Wed, 18 Dec 2019 17:15:55 +0000 (+0000) Subject: JAL-3394 Fixed jalviews?:// scheme for macOS startup X-Git-Tag: Develop-2_11_2_0-d20201215~80^2~28^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7cdc2834bc951c21575832f501ba5fd4a29325f9;p=jalview.git JAL-3394 Fixed jalviews?:// scheme for macOS startup --- diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 5d88768..49e0431 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher-local.jar b/getdown/lib/getdown-launcher-local.jar index 710ab06..8ddc526 100644 Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index e2b648d..b44d887 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 e7f21c6..1e53d62 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 @@ -1087,7 +1087,10 @@ public class Application } } - // test for jalview/s URL + // test for jalview/s URL. Insert startupNotification URI into start of _appargs + if (! StringUtil.isBlank(_jalviewUri)) { + _appargs.add(0, _jalviewUri); + } if (_appargs.size() > 0) { String uri = _appargs.get(0); try { @@ -1961,7 +1964,9 @@ public class Application for (int i = 0; i < filenames.length; i++) { String filename = filenames[i]; // skip any other locator files in a multiple file list - if (! filename.toLowerCase().endsWith("."+Application.LOCATOR_FILE_EXTENSION)) { + if (filename.startsWith("jalview://") || filename.startsWith("jalviews://")) { + setJalviewUri(filename); + } else if (! filename.toLowerCase().endsWith("."+Application.LOCATOR_FILE_EXTENSION)) { addStartupFile(filename); } } @@ -1976,6 +1981,10 @@ public class Application _startupFiles.add(new File(filename)); } + public static void setJalviewUri(String uri) { + _jalviewUri = uri; + } + private Config createLocatorConfig(Config.ParseOpts opts) { if (_locatorFile == null) { return null; @@ -2086,6 +2095,7 @@ public class Application protected static File _locatorFile; protected static List _startupFiles = new ArrayList<>(); + protected static String _jalviewUri; public static final String LOCATOR_FILE_EXTENSION = "jvl"; private boolean _initialised = false; diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 5d88768..49e0431 100644 Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ diff --git a/j8lib/getdown-core.jar b/j8lib/getdown-core.jar index 5d88768..49e0431 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ