diff --git a/package.nw/lib/adif.js b/package.nw/lib/adif.js index ec38556..4aca3cb 100644 --- a/package.nw/lib/adif.js +++ b/package.nw/lib/adif.js @@ -1143,8 +1143,8 @@ function loadLoTWLogFile() else { // We have no history, so our dates are not valid any more - g_adifLogSettings.lastFetch.lotw_qso = "1940-01-01"; - g_adifLogSettings.lastFetch.lotw_qsl = "1940-01-01"; + g_adifLogSettings.lastFetch.lotw_qso = "1970-01-01"; + g_adifLogSettings.lastFetch.lotw_qsl = "1970-01-01"; } } diff --git a/package.nw/lib/defaults.js b/package.nw/lib/defaults.js index 3d33725..e2d8583 100644 --- a/package.nw/lib/defaults.js +++ b/package.nw/lib/defaults.js @@ -43,9 +43,9 @@ var def_appSettings = { gridViewMode: 3, gridsquareDecayTime: 300, gtAgree: "", - gtBandFilter: "", + gtBandFilter: "auto", gtFlagImgSrc: 0, - gtModeFilter: "", + gtModeFilter: "auto", gtPropFilter: "mixed", gtMsgEnable: true, gtShareEnable: true, @@ -145,7 +145,7 @@ var def_adifLogSettings = { buttonClubCheckBox: false, buttonLOTWCheckBox: false, buttonQRZCheckBox: false, - buttonPsk24CheckBox: true + buttonPsk24CheckBox: false }, startup: { loadAdifCheckBox: false, @@ -187,8 +187,8 @@ var def_adifLogSettings = { }, downloads: {}, lastFetch: { - lotw_qso: "1940-01-01", - lotw_qsl: "1940-01-01" + lotw_qso: "1970-01-01", + lotw_qsl: "1970-01-01" } }; diff --git a/package.nw/lib/gt.js b/package.nw/lib/gt.js index 60eab7a..9aaa81e 100644 --- a/package.nw/lib/gt.js +++ b/package.nw/lib/gt.js @@ -5079,8 +5079,8 @@ function clearLogFilesAndCounts() tryToDeleteLog("qrz.adif"); tryToDeleteLog("clublog.adif"); g_adifLogSettings.downloads = {}; - g_adifLogSettings.lastFetch.lotw_qso = "1940-01-01"; - g_adifLogSettings.lastFetch.lotw_qsl = "1940-01-01"; + g_adifLogSettings.lastFetch.lotw_qso = "1970-01-01"; + g_adifLogSettings.lastFetch.lotw_qsl = "1970-01-01"; saveAdifSettings(); } @@ -11117,38 +11117,60 @@ function updateBasedOnIni() { var which = null; var count = 0; - if (g_wsjtxProcessRunning) count++; - if (g_jtdxProcessRunning) count++; - // UdpPortNotSet - if (g_appSettings.wsjtUdpPort == 0 && count == 1) + if (g_wsjtxProcessRunning) { - if (g_wsjtxProcessRunning) which = g_wsjtxIni; - else if (g_jtdxProcessRunning) which = g_jtdxIni; + count++; + } + if (g_jtdxProcessRunning) + { + count++; + } + // UdpPortNotSet + if (g_appSettings.wsjtUdpPort == 0 && count < 2) + { + if (g_wsjtxProcessRunning || count == 0) + { + which = g_wsjtxIni; + } + else if (g_jtdxProcessRunning) + { + which = g_jtdxIni; + } + if (which != null && which.port > -1) { g_appSettings.wsjtUdpPort = which.port; g_appSettings.wsjtIP = which.ip; } + if (which == null) { g_appSettings.wsjtUdpPort = 2237; g_appSettings.wsjtIP = ""; } - if ( - ipToInt(g_appSettings.wsjtIP) >= ipToInt("224.0.0.0") && - ipToInt(g_appSettings.wsjtIP) < ipToInt("240.0.0.0") - ) + + if (ipToInt(g_appSettings.wsjtIP) >= ipToInt("224.0.0.0") && ipToInt(g_appSettings.wsjtIP) < ipToInt("240.0.0.0")) { g_appSettings.multicast = true; } - else g_appSettings.multicast = false; + else + { + g_appSettings.multicast = false; + } } // Which INI do we load? if (g_appSettings.wsjtUdpPort) { which = null; - if (g_wsjtxIni.port == g_appSettings.wsjtUdpPort) which = g_wsjtxIni; - else if (g_jtdxIni.port == g_appSettings.wsjtUdpPort) which = g_jtdxIni; + if (g_wsjtxIni.port == g_appSettings.wsjtUdpPort) + { + which = g_wsjtxIni; + } + else if (g_jtdxIni.port == g_appSettings.wsjtUdpPort) + { + which = g_jtdxIni; + } + if (which != null) { myDEcall = which.MyCall; @@ -11157,25 +11179,17 @@ function updateBasedOnIni() g_lastMode = myMode; g_workingIniPath = which.IniPath; } - if ( - which != null && - which.BroadcastToN1MM == true && - g_N1MMSettings.enable == true - ) + + if (which != null && which.BroadcastToN1MM == true && g_N1MMSettings.enable == true) { - if ( - which.N1MMServer == g_N1MMSettings.ip && - which.N1MMServerPort == g_N1MMSettings.port - ) + if (which.N1MMServer == g_N1MMSettings.ip && which.N1MMServerPort == g_N1MMSettings.port) { buttonN1MMCheckBox.checked = g_N1MMSettings.enable = false; localStorage.N1MMSettings = JSON.stringify(g_N1MMSettings); - alert( - which.appName + - " N1MM Logger+ is enabled with same settings, disabled GridTracker N1MM logger" - ); + alert(which.appName + " N1MM Logger+ is enabled with same settings, disabled GridTracker N1MM logger"); } } + if (which != null) { if (g_appSettings.wsjtIP == "") @@ -11184,37 +11198,34 @@ function updateBasedOnIni() } } } - if (myDEGrid.length > 0) setHomeGridsquare(); + + if (myDEGrid.length > 0) + { + setHomeGridsquare(); + } else { - if (typeof nw != "undefined") - { - alert("Location not available!\nEither start WSJT-X/JTDX or enter your grid square in the settings "); - } + alert("Location not available!\nEither start WSJT-X/JTDX or enter your grid square in settings"); } } function CheckReceivePortIsNotForwardPort(value) { - if ( - udpForwardIpInput.value == "127.0.0.1" && - udpForwardPortInput.value == value && - g_appSettings.wsjtIP == "" && - udpForwardEnable.checked - ) + if (udpForwardIpInput.value == "127.0.0.1" && udpForwardPortInput.value == value && g_appSettings.wsjtIP == "" && udpForwardEnable.checked) { return false; } + return true; } function CheckForwardPortIsNotReceivePort(value) { - if ( - udpForwardIpInput.value == "127.0.0.1" && - udpPortInput.value == value && - g_appSettings.wsjtIP == "" - ) { return false; } + if (udpForwardIpInput.value == "127.0.0.1" && udpPortInput.value == value && g_appSettings.wsjtIP == "") + { + return false; + } + return true; } @@ -11630,13 +11641,10 @@ function applyCallsignsAndDates() function selectElementContents(el) { - var body = document.body, - range, - sel; if (document.createRange && window.getSelection) { - range = document.createRange(); - sel = window.getSelection(); + var range = document.createRange(); + var sel = window.getSelection(); sel.removeAllRanges(); range.selectNodeContents(el); sel.addRange(range);