From: Ben Soares Date: Wed, 26 Jun 2019 23:55:20 +0000 (+0100) Subject: JAL-3322 Once background displayed, allow asynchronous progress setting X-Git-Tag: Release_2_11_0~2^2~37 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e71869cde71ac42b05f9a1c45776dc5bb7f469d7;p=jalview.git JAL-3322 Once background displayed, allow asynchronous progress setting --- diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 7ee98a0..b3aa99b 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index 42efe3c..264ed45 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 c3a3d79..bbac55f 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 @@ -150,9 +150,12 @@ public class Application /** Whether progress text should be hidden or not. */ public final boolean hideProgressText; - /** Whether the splash screen should retain focus. */ + /** Whether the splash screen should update non-asynchronously before being shown. */ public final boolean progressSync; + /** Whether the splash screen should update non-asynchronously after being shown. */ + public final boolean progressSyncAfterShown; + /** Whether the splash screen should retain focus. */ public final boolean keepOnTop; @@ -180,7 +183,8 @@ public class Application ", pb=" + progressBar + ", srect=" + status + ", st=" + statusText + ", shadow=" + textShadow + ", err=" + installError + ", nrect=" + patchNotes + ", notes=" + patchNotesUrl + ", stepPercentages=" + stepPercentages + - ", hideProgressText=" + hideProgressText + ", keepOnTop=" + keepOnTop + ", progressSync=" + progressSync + ", minShow=" + minShowSeconds + + ", hideProgressText=" + hideProgressText + ", keepOnTop=" + keepOnTop + ", progressSync=" + progressSync + + ", progressSyncAfterShown=" + progressSyncAfterShown + ", minShow=" + minShowSeconds + ", displayAppbase=" + displayAppbase + ", displayVersion=" + displayVersion + "]"; } @@ -191,6 +195,7 @@ public class Application this.progressText = config.getColor("ui.progress_text", Color.BLACK); this.hideProgressText = config.getBoolean("ui.hide_progress_text"); this.progressSync = config.getBoolean("ui.progress_sync"); + this.progressSyncAfterShown = config.getBoolean("ui.progress_sync_after_shown"); this.keepOnTop = config.getBoolean("ui.keep_on_top"); this.displayAppbase = config.getBoolean("ui.display_appbase"); this.displayVersion = config.getBoolean("ui.display_version"); 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 ba238de..f64959b 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 @@ -1124,16 +1124,18 @@ public abstract class Getdown extends Thread } catch (Exception e) { log.warning("Could't read config when invoking GUI action", "Exception", e.getMessage()); } - if (_ifc != null && _ifc.progressSync) { + if (_ifc != null && (_shownContainer?_ifc.progressSyncAfterShown:_ifc.progressSync)) { try { EventQueue.invokeAndWait(r); //r.run(); + log.warning("INVOKEANDWAIT", "shownContainer", _shownContainer); } catch (Exception e) { log.warning("Tried to invokeAndWait but couldn't. Going to invokeLater instead", "Exception", e.getMessage()); EventQueue.invokeLater(r); } } else { EventQueue.invokeLater(r); + log.warning("INVOKELATER", "ifc", _ifc, "shownContainer", _shownContainer); //r.run(); } @@ -1159,13 +1161,15 @@ public abstract class Getdown extends Thread protected boolean _launchInSilent; protected boolean _noUpdate; protected long _startup; - + protected Set _toInstallResources; protected boolean _readyToInstall; protected boolean _enableTracking = true; protected int _reportedProgress = 0; + protected boolean _shownContainer; + /** Number of minutes to wait after startup before beginning any real heavy lifting. */ protected int _delay; 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 4adc77c..7c54f80 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 @@ -203,6 +203,7 @@ public class GetdownApp SwingUtil.centerWindow(_frame); _frame.setVisible(true); } + _shownContainer = true; } @Override diff --git a/gradle.properties b/gradle.properties index 6f3092e..0cb5c68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -63,6 +63,7 @@ getdown_txt_strict_comments = true getdown_txt_title = Jalview getdown_txt_ui.name = Jalview getdown_txt_ui.progress_sync = true +getdown_txt_ui.progress_sync_after_shown = false getdown_txt_ui.keep_on_top = true getdown_txt_ui.display_appbase = true getdown_txt_ui.display_version = true diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 7ee98a0..b3aa99b 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 7ee98a0..b3aa99b 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ