From: drowe67 Date: Mon, 1 Feb 2016 03:24:18 +0000 (+0000) Subject: plugin option greyed out at run time X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=ab7d0b21c3e58d9b81c09867db9b8ee8ca9f037f;p=freetel-svn-tracking.git plugin option greyed out at run time git-svn-id: https://svn.code.sf.net/p/freetel/code@2675 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/freedv-dev/src/fdmdv2_main.cpp b/freedv-dev/src/fdmdv2_main.cpp index 9666786c..59338b2e 100644 --- a/freedv-dev/src/fdmdv2_main.cpp +++ b/freedv-dev/src/fdmdv2_main.cpp @@ -1617,7 +1617,7 @@ void MainFrame::VoiceKeyerProcessEvent(int vk_event) { next_state = VK_IDLE; } - if (vk_event == VK_DT) { + if (vk_event == VK_DT) { vk_rx_time += DT; // if we lose sync restart RX state @@ -2179,6 +2179,11 @@ void MainFrame::OnToolsPlugInCfg(wxCommandEvent& event) dlg->ShowModal(); delete dlg; } + +void MainFrame::OnToolsPlugInCfgUI(wxUpdateUIEvent& event) +{ + event.Enable(!m_RxRunning); +} //------------------------------------------------------------------------- diff --git a/freedv-dev/src/fdmdv2_main.h b/freedv-dev/src/fdmdv2_main.h index acd99a68..74af02da 100644 --- a/freedv-dev/src/fdmdv2_main.h +++ b/freedv-dev/src/fdmdv2_main.h @@ -501,6 +501,7 @@ class MainFrame : public TopFrame void OnToolsOptionsUI(wxUpdateUIEvent& event); void OnToolsPlugInCfg( wxCommandEvent& event ); + void OnToolsPlugInCfgUI( wxUpdateUIEvent& event ); void OnPlayFileToMicIn( wxCommandEvent& event ); void StopPlayFileToMicIn(void); diff --git a/freedv-dev/src/topFrame.cpp b/freedv-dev/src/topFrame.cpp index 514d8949..0e228bab 100644 --- a/freedv-dev/src/topFrame.cpp +++ b/freedv-dev/src/topFrame.cpp @@ -476,6 +476,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const this->Connect(m_menuItemOptions->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI)); this->Connect(m_menuItemPlugIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsPlugInCfg)); + this->Connect(m_menuItemPlugIn->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsPlugInCfgUI)); this->Connect(m_menuItemPlayFileToMicIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayFileToMicIn)); this->Connect(m_menuItemRecFileFromRadio->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnRecFileFromRadio)); diff --git a/freedv-dev/src/topFrame.h b/freedv-dev/src/topFrame.h index 2cfe7291..3ed13a9c 100644 --- a/freedv-dev/src/topFrame.h +++ b/freedv-dev/src/topFrame.h @@ -127,6 +127,7 @@ class TopFrame : public wxFrame virtual void OnToolsOptions( wxCommandEvent& event ) { event.Skip(); } virtual void OnToolsPlugInCfg( wxCommandEvent& event ) { event.Skip(); } + virtual void OnToolsPlugInCfgUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnToolsUDP( wxCommandEvent& event ) { event.Skip(); } virtual void OnToolsOptionsUI( wxUpdateUIEvent& event ) { event.Skip(); }