From a800086bf169fc6495fef3effa56338f5cff4804 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 11 Jan 2023 13:04:47 +0000 Subject: [PATCH] JAL-1988 JAL-3772 Mark the _default_ STARTUP_FILE as 'all saved' after initial opening --- src/jalview/bin/Jalview.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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() -- 1.7.10.2