From c8dd72de3e37db216f740cfe756cd7b920561985 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sun, 22 Jan 2023 14:36:05 -0500 Subject: [PATCH] Include version number in title --- gui/main.js | 1 + gui/preload-main.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gui/main.js b/gui/main.js index 049e0c87..92b51dc6 100644 --- a/gui/main.js +++ b/gui/main.js @@ -375,6 +375,7 @@ app.whenReady().then(() => { daemonPath=null; mainLog.info("Daemon binary doesn't exist--normal for dev environments.") } + win.send("action-set-app-version",app.getVersion()); }); app.on('activate', () => { diff --git a/gui/preload-main.js b/gui/preload-main.js index 1a21ce33..7a1b27fb 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -28,7 +28,8 @@ const config = require(configPath); // we are going to check if we have unequal values before we start calculating again var dbfs_level_raw = 0 - +//Global version variable +var appVer = null; // START INTERVALL COMMAND EXECUTION FOR STATES //setInterval(sock.getRxBuffer, 1000); @@ -2747,9 +2748,14 @@ function checkRigctld(){ ipcRenderer.on('action-check-rigctld', (event, data) => { document.getElementById("hamlib_rigctld_status").value = data["state"]; }); + +ipcRenderer.on('action-set-app-version', (event, data) => { + appVer = data; +}); + function updateTitle(mycall = config.mycall , tnc = config.tnc_host, tncport = config.tnc_port, appender = ""){ //Multiple consecutive spaces get converted to a single space - var title ="FreeDATA - Call: " + mycall + " - TNC: " + tnc +":" + tncport + appender; + var title ="FreeDATA " + appVer + " - Call: " + mycall + " - TNC: " + tnc + ":" + tncport + appender; if (title != document.title) document.title=title; }