From: Ben Soares Date: Wed, 11 Jan 2023 13:04:47 +0000 (+0000) Subject: JAL-1988 JAL-3772 Mark the _default_ STARTUP_FILE as 'all saved' after initial opening X-Git-Tag: Release_2_11_3_0~23^2~4^2~4 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=a800086bf169fc6495fef3effa56338f5cff4804 JAL-1988 JAL-3772 Mark the _default_ STARTUP_FILE as 'all saved' after initial opening --- diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 0ec9889..9472fb3 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -877,6 +877,8 @@ public class Jalview * @j2sIgnore */ { + boolean defaultStartupFile = Cache.getDefault("STARTUP_FILE", + null) == null; file = Cache.getDefault("STARTUP_FILE", Cache.getDefault("www.jalview.org", "https://www.jalview.org") + "/examples/exampleFile_2_7.jvp"); @@ -890,6 +892,7 @@ public class Jalview file.replace("2_7.jar", "2_7.jvp"); // and remove the stale setting Cache.removeProperty("STARTUP_FILE"); + defaultStartupFile = true; } protocol = AppletFormatAdapter.checkProtocol(file); @@ -911,6 +914,11 @@ public class Jalview startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol, format); + if (defaultStartupFile) + { + Console.debug("Resetting up-to-date flag for startup file"); + startUpAlframe.getViewport().setSavedUpToDate(true); + } // extract groovy arguments before anything else. } @@ -1125,22 +1133,27 @@ public class Jalview private static boolean setFlatLookAndFeel() { boolean set = false; - if (Platform.isMac()) { + if (Platform.isMac()) + { try { - UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacLightLaf"); + UIManager.setLookAndFeel( + "com.formdev.flatlaf.themes.FlatMacLightLaf"); set = true; + Console.debug("*** Loaded FlatMacLightLaf"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { Console.debug("Exception loading FlatMacLightLaf", e); } } - if (!set) { + if (!set) + { try { UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf"); set = true; + Console.debug("*** Loaded FlatLightLaf"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { @@ -1158,6 +1171,7 @@ public class Jalview if (SystemInfo.isMacFullWindowContentSupported && Desktop.desktop != null) { + Console.debug("Setting transparent title bar"); Desktop.desktop.getRootPane() .putClientProperty("apple.awt.fullWindowContent", true); Desktop.desktop.getRootPane()