From b5c34e53b78d74be31d039870003f7c69f72d785 Mon Sep 17 00:00:00 2001 From: UnfamiliarLegacy <74633542+UnfamiliarLegacy@users.noreply.github.com> Date: Sun, 23 Jun 2024 20:50:30 +0200 Subject: [PATCH] Show fork in program title --- G-Earth/src/main/java/gearth/GEarth.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/G-Earth/src/main/java/gearth/GEarth.java b/G-Earth/src/main/java/gearth/GEarth.java index ac5d84c..1740845 100644 --- a/G-Earth/src/main/java/gearth/GEarth.java +++ b/G-Earth/src/main/java/gearth/GEarth.java @@ -26,6 +26,8 @@ import java.util.Properties; public class GEarth extends Application { + private static final String OFFICIAL_REPOSITORY = "sirjonasxx/G-Earth"; + private static final Logger logger = LoggerFactory.getLogger(GEarth.class); public static GEarth main; @@ -141,7 +143,8 @@ public class GEarth extends Application { stage.getIcons().clear(); final Image image = new Image(GEarth.class.getResourceAsStream(String.format("/gearth/ui/themes/%s/logoSmall.png", theme.overridesLogo() ? theme.internalName() : defaultTheme.internalName()))); stage.getIcons().add(image); - stage.setTitle((theme.overridesTitle() ? theme.title() : defaultTheme.title()) + " " + GEarth.version); + final String isFork = GEarth.repository.equals(OFFICIAL_REPOSITORY) ? "" : " (" + GEarth.repository + ")"; + stage.setTitle((theme.overridesTitle() ? theme.title() : defaultTheme.title()) + " " + GEarth.version + isFork); controller.infoController.img_logo.setImage(new Image(GEarth.class.getResourceAsStream( String.format(