forked from j62/ctbrec
Add version number to window title
This commit is contained in:
parent
8d4ba6d513
commit
154995a760
|
@ -59,9 +59,9 @@ public class Launcher extends Application {
|
||||||
checkForUpdates();
|
checkForUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createGui(Stage primaryStage) {
|
private void createGui(Stage primaryStage) throws IOException {
|
||||||
LOG.debug("Creating GUI");
|
LOG.debug("Creating GUI");
|
||||||
primaryStage.setTitle("CTB Recorder");
|
primaryStage.setTitle("CTB Recorder " + getVersion());
|
||||||
InputStream icon = getClass().getResourceAsStream("/icon.png");
|
InputStream icon = getClass().getResourceAsStream("/icon.png");
|
||||||
primaryStage.getIcons().add(new Image(icon));
|
primaryStage.getIcons().add(new Image(icon));
|
||||||
tabPane = new TabPane();
|
tabPane = new TabPane();
|
||||||
|
@ -214,7 +214,7 @@ public class Launcher extends Application {
|
||||||
|
|
||||||
private Version getVersion() throws IOException {
|
private Version getVersion() throws IOException {
|
||||||
if(Objects.equals(System.getenv("CTBREC_DEV"), "1")) {
|
if(Objects.equals(System.getenv("CTBREC_DEV"), "1")) {
|
||||||
return Version.of("0.0.0");
|
return Version.of("0.0.0-DEV");
|
||||||
} else {
|
} else {
|
||||||
try(InputStream is = getClass().getClassLoader().getResourceAsStream("version")) {
|
try(InputStream is = getClass().getClassLoader().getResourceAsStream("version")) {
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
||||||
|
|
Loading…
Reference in New Issue