From 5833a7893075b812002e928c0f3a9b1ea7421a89 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sun, 15 Aug 2021 01:02:48 -0700 Subject: [PATCH 1/2] Update mode display in status bar on PTT start/stop. --- src/ongui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ongui.cpp b/src/ongui.cpp index 40f6e2e3..fd6caa88 100644 --- a/src/ongui.cpp +++ b/src/ongui.cpp @@ -487,7 +487,8 @@ void MainFrame::togglePTT(void) { Hamlib *hamlib = wxGetApp().m_hamlib; wxString hamlibError; if (wxGetApp().m_boolHamlibUseForPTT && hamlib != NULL) { - if (hamlib->ptt(g_tx, hamlibError) == false) { + // Update mode display on the bottom of the main UI. + if (hamlib->update_frequency_and_mode() != 0 || hamlib->ptt(g_tx, hamlibError) == false) { wxMessageBox(wxString("Hamlib PTT Error: ") + hamlibError, wxT("Error"), wxOK | wxICON_ERROR, this); } } From c17df14a91ab0f25c5cad94808e84b9128bafd22 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Wed, 18 Aug 2021 02:24:49 -0700 Subject: [PATCH 2/2] Reset window color back to default when unknown or disabled. --- src/hamlib.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hamlib.cpp b/src/hamlib.cpp index da09c9b7..fd76f3bb 100644 --- a/src/hamlib.cpp +++ b/src/hamlib.cpp @@ -259,6 +259,7 @@ void Hamlib::enable_mode_detection(wxStaticText* statusBox, bool vhfUhfMode) { m_modeBox->SetLabel(wxT("unk")); m_modeBox->Enable(false); + m_modeBox->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); m_modeBox = NULL; } else @@ -292,6 +293,7 @@ void Hamlib::disable_mode_detection() // Disable control. m_modeBox->SetLabel(wxT("unk")); m_modeBox->Enable(false); + m_modeBox->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); m_modeBox = NULL; } }