From 3f47f6091cb48ab7beba25a8fe4514d0cc6a2c3a Mon Sep 17 00:00:00 2001 From: drowe67 Date: Thu, 23 May 2013 23:00:55 +0000 Subject: [PATCH] added options dialog, bumped version git-svn-id: https://svn.code.sf.net/p/freetel/code@1268 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/src/Makefile.linux | 5 +- fdmdv2/src/dlg_filter.cpp | 2 +- fdmdv2/src/dlg_filter.h | 2 +- fdmdv2/src/dlg_options.cpp | 158 +++++++++++++++++++++++++++++++++++++ fdmdv2/src/dlg_options.h | 57 +++++++++++++ fdmdv2/src/fdmdv2_main.cpp | 25 +++--- fdmdv2/src/fdmdv2_main.h | 8 +- fdmdv2/src/topFrame.cpp | 23 +++--- fdmdv2/src/topFrame.h | 6 +- fdmdv2/src/version.h | 2 +- 10 files changed, 255 insertions(+), 33 deletions(-) create mode 100644 fdmdv2/src/dlg_options.cpp create mode 100644 fdmdv2/src/dlg_options.h diff --git a/fdmdv2/src/Makefile.linux b/fdmdv2/src/Makefile.linux index fb00370c..16c453a4 100644 --- a/fdmdv2/src/Makefile.linux +++ b/fdmdv2/src/Makefile.linux @@ -1,7 +1,7 @@ # src/Makefile.linux # David Rowe 10 Oct 2012 # -# Makefile for Linux - buils the less common libraries locally and +# Makefile for Linux - builds the less common libraries locally and # doesn't install them. # # $ make -f Makefile.linux @@ -88,11 +88,12 @@ fdmdv2_pa_wrapper.o \ dlg_audiooptions.o \ dlg_comports.o \ dlg_filter.o \ +dlg_options.o \ varicode.o \ sox_biquad.o \ codec2-dev/src/golay23.c -HDRS = ../version.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_filter.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h varicode.h codec2-dev/src/golay23.h +HDRS = ../version.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_filter.h dlg_options.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h varicode.h codec2-dev/src/golay23.h all: $(LIBS_TO_BUILD) $(CODEC2)/.built $(CTB)/.built freedv diff --git a/fdmdv2/src/dlg_filter.cpp b/fdmdv2/src/dlg_filter.cpp index 6eed6564..767e9983 100644 --- a/fdmdv2/src/dlg_filter.cpp +++ b/fdmdv2/src/dlg_filter.cpp @@ -132,7 +132,7 @@ FilterDlg::FilterDlg(wxWindow* parent, bool running, bool *newMicInFilter, bool // Spectrum Plots ----------------------------------------------------------- long nb_style = wxAUI_NB_BOTTOM | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS; - m_auiNotebook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,300), nb_style); + m_auiNotebook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,200), nb_style); m_auiNotebook->SetFont(wxFont(8, 70, 90, 90, false, wxEmptyString)); bSizer30->Add(m_auiNotebook, 0, wxEXPAND|wxALL, 3); diff --git a/fdmdv2/src/dlg_filter.h b/fdmdv2/src/dlg_filter.h index ab43f7bd..679832e6 100644 --- a/fdmdv2/src/dlg_filter.h +++ b/fdmdv2/src/dlg_filter.h @@ -53,7 +53,7 @@ class FilterDlg : public wxDialog public: FilterDlg( wxWindow* parent, bool running, bool *newMicInFilter, bool *newSpkOutFilter, wxWindowID id = wxID_ANY, const wxString& title = _("Filter"), - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1000, 700 ), + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800, 550 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~FilterDlg(); diff --git a/fdmdv2/src/dlg_options.cpp b/fdmdv2/src/dlg_options.cpp new file mode 100644 index 00000000..fbad7069 --- /dev/null +++ b/fdmdv2/src/dlg_options.cpp @@ -0,0 +1,158 @@ +//========================================================================== +// Name: dlg_options.cpp +// Purpose: Dialog for controlling misc FreeDV options +// Date: May 24 2013 +// Authors: David Rowe, David Witten +// +// License: +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2.1, +// as published by the Free Software Foundation. This program is +// distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +// License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, see . +// +//========================================================================== + +#include "dlg_options.h" + +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +// Class OptionsDlg +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) +{ + + this->SetSizeHints(wxDefaultSize, wxDefaultSize); + + wxBoxSizer* bSizer30; + bSizer30 = new wxBoxSizer(wxVERTICAL); + + //------------------------------ + // Call Sign Text Box + //------------------------------ + + wxStaticBoxSizer* sbSizer_callSign; + sbSizer_callSign = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Call Sign")), wxVERTICAL); + + m_txtCtrlCallSign = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); + m_txtCtrlCallSign->SetToolTip(_("Call Sign of your station")); + sbSizer_callSign->Add(m_txtCtrlCallSign, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3); + + bSizer30->Add(sbSizer_callSign,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + + //------------------------------ + // Test Frames check box + //------------------------------ + + wxStaticBoxSizer* sbSizer_testFrames; + sbSizer_testFrames = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Test Frames")), wxVERTICAL); + + m_ckboxTestFrame = new wxCheckBox(this, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); + sbSizer_testFrames->Add(m_ckboxTestFrame, 0, wxALIGN_LEFT, 0); + + bSizer30->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + + //------------------------------ + // Cancel - OK Buttons + //------------------------------ + + wxBoxSizer* bSizer31 = new wxBoxSizer(wxHORIZONTAL); + m_sdbSizer5Cancel = new wxButton(this, wxID_CANCEL); + bSizer31->Add(m_sdbSizer5Cancel, 0, wxALL, 2); + m_sdbSizer5OK = new wxButton(this, wxID_OK); + bSizer31->Add(m_sdbSizer5OK, 0, wxALL, 2); + + bSizer30->Add(bSizer31, 0, wxALIGN_RIGHT|wxALL, 0); + + this->SetSizer(bSizer30); + this->Layout(); + + this->Centre(wxBOTH); + + // Connect Events ------------------------------------------------------- + + this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(OptionsDlg::OnInitDialog)); + + m_sdbSizer5Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnCancel), NULL, this); + m_sdbSizer5OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnOK), NULL, this); +} + +//------------------------------------------------------------------------- +// ~OptionsDlg() +//------------------------------------------------------------------------- +OptionsDlg::~OptionsDlg() +{ + // Disconnect Events + + this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(OptionsDlg::OnInitDialog)); + + m_sdbSizer5Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnCancel), NULL, this); + m_sdbSizer5OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnOK), NULL, this); +} + + +//------------------------------------------------------------------------- +// ExchangeData() +//------------------------------------------------------------------------- +void OptionsDlg::ExchangeData(int inout, bool storePersistent) +{ + wxConfigBase *pConfig = wxConfigBase::Get(); + + if(inout == EXCHANGE_DATA_IN) + { + m_txtCtrlCallSign->SetValue(wxGetApp().m_callSign); + m_ckboxTestFrame->SetValue(wxGetApp().m_testFrames); + } + + if(inout == EXCHANGE_DATA_OUT) + { + // LPC Post filter + + wxGetApp().m_callSign = m_txtCtrlCallSign->GetValue(); + wxGetApp().m_testFrames = m_ckboxTestFrame->GetValue(); + + if (storePersistent) { + pConfig->Write(wxT("/Data/CallSign"), wxGetApp().m_callSign); + pConfig->Flush(); + } + } + delete wxConfigBase::Set((wxConfigBase *) NULL); +} + +//------------------------------------------------------------------------- +// OnCancel() +//------------------------------------------------------------------------- +void OptionsDlg::OnCancel(wxCommandEvent& event) +{ + this->EndModal(wxID_CANCEL); +} + +//------------------------------------------------------------------------- +// OnOK() +//------------------------------------------------------------------------- +void OptionsDlg::OnOK(wxCommandEvent& event) +{ + ExchangeData(EXCHANGE_DATA_OUT, true); + this->EndModal(wxID_OK); +} + +//------------------------------------------------------------------------- +// OnClose() +//------------------------------------------------------------------------- +void OptionsDlg::OnClose(wxCloseEvent& event) +{ + this->EndModal(wxID_OK); +} + +//------------------------------------------------------------------------- +// OnInitDialog() +//------------------------------------------------------------------------- +void OptionsDlg::OnInitDialog(wxInitDialogEvent& event) +{ + ExchangeData(EXCHANGE_DATA_IN, false); +} diff --git a/fdmdv2/src/dlg_options.h b/fdmdv2/src/dlg_options.h new file mode 100644 index 00000000..a85d354f --- /dev/null +++ b/fdmdv2/src/dlg_options.h @@ -0,0 +1,57 @@ +//========================================================================== +// Name: dlg_options.h +// Purpose: Dialog for controlling misc FreeDV options +// Created: Nov 25 2012 +// Authors: David Rowe, David Witten +// +// License: +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2.1, +// as published by the Free Software Foundation. This program is +// distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +// License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, see . +// +//========================================================================== + +#ifndef __OPTIONS_DIALOG__ +#define __OPTIONS_DIALOG__ + +#include "fdmdv2_main.h" + +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +// Class OptionsDlg +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= +class OptionsDlg : public wxDialog +{ + public: + OptionsDlg( wxWindow* parent, + wxWindowID id = wxID_ANY, const wxString& title = _("Options"), + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,180), + long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~OptionsDlg(); + + void ExchangeData(int inout, bool storePersistent); + + protected: + // Handlers for events. + void OnCancel(wxCommandEvent& event); + void OnOK(wxCommandEvent& event); + void OnClose(wxCloseEvent& event); + void OnInitDialog(wxInitDialogEvent& event); + + wxTextCtrl *m_txtCtrlCallSign; + wxCheckBox *m_ckboxTestFrame; + + wxButton* m_sdbSizer5OK; + wxButton* m_sdbSizer5Cancel; + + private: +}; + +#endif // __OPTIONS_DIALOG__ diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 211900fc..2dea7956 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -440,6 +440,7 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) g_test_frame_sync_state = 0; g_total_bit_errors = 0; g_total_bits = 0; + wxGetApp().m_testFrames = false; } //------------------------------------------------------------------------- @@ -737,7 +738,7 @@ void MainFrame::OnTimer(wxTimerEvent &evt) // Toggle test frame mode at run time - if (!g_testFrames && m_ckboxTestFrame->GetValue()) { + if (!g_testFrames && wxGetApp().m_testFrames) { // reset stats on check box off to on transition @@ -745,17 +746,17 @@ void MainFrame::OnTimer(wxTimerEvent &evt) g_total_bits = 0; g_total_bit_errors = 0; } - g_testFrames = m_ckboxTestFrame->GetValue(); + g_testFrames = wxGetApp().m_testFrames; if (g_State) { char bits[80], errors[80], ber[80]; // update stats on main page - sprintf(bits, "Bits...: %d", g_total_bits); wxString bits_string(bits); m_textBits->SetLabel(bits_string); - sprintf(errors, "Errors: %d", g_total_bit_errors); wxString errors_string(errors); m_textErrors->SetLabel(errors_string); + sprintf(bits, "Bits: %d", g_total_bits); wxString bits_string(bits); m_textBits->SetLabel(bits_string); + sprintf(errors, "Errs: %d", g_total_bit_errors); wxString errors_string(errors); m_textErrors->SetLabel(errors_string); float b = (float)g_total_bit_errors/(1E-6+g_total_bits); - sprintf(ber, "BER...: %4.3f", b); wxString ber_string(ber); m_textBER->SetLabel(ber_string); + sprintf(ber, "BER: %4.3f", b); wxString ber_string(ber); m_textBER->SetLabel(ber_string); // update error plots @@ -1407,15 +1408,14 @@ void MainFrame::OnToolsFilter(wxCommandEvent& event) } //------------------------------------------------------------------------- -// OnToolsSetCallSign() +// OnToolsOptions() //------------------------------------------------------------------------- -void MainFrame::OnToolsSetCallSign(wxCommandEvent& event) +void MainFrame::OnToolsOptions(wxCommandEvent& event) { wxUnusedVar(event); - printf("MainFrame::OnToolSetCallSign\n"); - wxGetApp().m_callSign = wxGetTextFromUser(wxT("Enter Callsign"), - wxT("Enter Callsign"), - wxGetApp().m_callSign); + OptionsDlg *dlg = new OptionsDlg(NULL); + dlg->ShowModal(); + delete dlg; } //------------------------------------------------------------------------- @@ -1439,7 +1439,6 @@ void MainFrame::OnToolsComCfg(wxCommandEvent& event) if(m_serialPort != NULL) { - int iLineState = m_serialPort->GetLineState(); CloseSerialPort(); } ComPortsDlg *dlg = new ComPortsDlg(NULL); @@ -1599,6 +1598,7 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event) m_rb1400old->Disable(); m_rb1600->Disable(); + m_rb1600Wide->Disable(); #ifdef DISABLED_FEATURE m_rb1400->Disable(); m_rb2000->Disable(); @@ -1722,6 +1722,7 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event) m_togBtnOnOff->SetLabel(wxT("Start")); m_rb1400old->Enable(); m_rb1600->Enable(); + m_rb1600Wide->Enable(); #ifdef DISABLED_FEATURE m_rb1400->Enable(); m_rb2000->Enable(); diff --git a/fdmdv2/src/fdmdv2_main.h b/fdmdv2/src/fdmdv2_main.h index 63393a30..334b7c5d 100644 --- a/fdmdv2/src/fdmdv2_main.h +++ b/fdmdv2/src/fdmdv2_main.h @@ -74,6 +74,7 @@ #include "dlg_audiooptions.h" #include "dlg_filter.h" #include "dlg_about.h" +#include "dlg_options.h" #include "varicode.h" #include "sox_biquad.h" @@ -201,6 +202,10 @@ class MainApp : public wxApp bool loadConfig(); bool saveConfig(); + // misc + + bool m_testFrames; + protected: }; @@ -378,7 +383,7 @@ class MainFrame : public TopFrame void OnToolsComCfg( wxCommandEvent& event ); void OnToolsComCfgUI( wxUpdateUIEvent& event ); void OnToolsFilter( wxCommandEvent& event ); - void OnToolsSetCallSign(wxCommandEvent& event); + void OnToolsOptions(wxCommandEvent& event); void OnPlayFileToMicIn( wxCommandEvent& event ); void OnRecFileFromRadio( wxCommandEvent& event ); @@ -437,7 +442,6 @@ class MainFrame : public TopFrame void* designAnEQFilter(const char filterType[], float freqHz, float gaindB, float Q = 0.0); void designEQFilters(paCallBackData *cb); void deleteEQFilters(paCallBackData *cb); - }; void txRxProcessing(); diff --git a/fdmdv2/src/topFrame.cpp b/fdmdv2/src/topFrame.cpp index 3ac60310..b277e71c 100644 --- a/fdmdv2/src/topFrame.cpp +++ b/fdmdv2/src/topFrame.cpp @@ -60,14 +60,14 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const m_menuItemRigCtrlCfg = new wxMenuItem(tools, wxID_ANY, wxString(_("&PTT Config")) , wxEmptyString, wxITEM_NORMAL); tools->Append(m_menuItemRigCtrlCfg); + wxMenuItem* m_menuItemOptions; + m_menuItemOptions = new wxMenuItem(tools, wxID_ANY, wxString(_("Options")) , wxEmptyString, wxITEM_NORMAL); + tools->Append(m_menuItemOptions); + wxMenuItem* m_menuItemFilter; m_menuItemFilter = new wxMenuItem(tools, wxID_ANY, wxString(_("&Filter")) , wxEmptyString, wxITEM_NORMAL); tools->Append(m_menuItemFilter); - wxMenuItem* m_menuItemSetCallSign; - m_menuItemSetCallSign = new wxMenuItem(tools, wxID_ANY, wxString(_("Set Call Sign")) , wxEmptyString, wxITEM_NORMAL); - tools->Append(m_menuItemSetCallSign); - wxMenuItem* m_menuItemCaptTxInStream; m_menuItemCaptTxInStream = new wxMenuItem(tools, wxID_ANY, wxString(_("&Capture Tx Input Stream")), wxEmptyString, wxITEM_NORMAL); @@ -156,11 +156,11 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const m_BtnBerReset = new wxButton(this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, 0); sbSizer_ber->Add(m_BtnBerReset, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1); - m_textBits = new wxStaticText(this, wxID_ANY, wxT("Bits...: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + m_textBits = new wxStaticText(this, wxID_ANY, wxT("Bits: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); sbSizer_ber->Add(m_textBits, 0, wxALIGN_LEFT, 1); - m_textErrors = new wxStaticText(this, wxID_ANY, wxT("Errors: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + m_textErrors = new wxStaticText(this, wxID_ANY, wxT("Errs: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); sbSizer_ber->Add(m_textErrors, 0, wxALIGN_LEFT, 1); - m_textBER = new wxStaticText(this, wxID_ANY, wxT("BER...: 0.0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + m_textBER = new wxStaticText(this, wxID_ANY, wxT("BER: 0.0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); sbSizer_ber->Add(m_textBER, 0, wxALIGN_LEFT, 1); leftSizer->Add(sbSizer_ber,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); @@ -309,6 +309,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const rightSizer->Add(sbSizer_mode,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + #ifdef MOVED_TO_OPTIONS_DIALOG /* new --- */ //------------------------------ @@ -322,7 +323,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const sbSizer_testFrames->Add(m_ckboxTestFrame, 0, wxALIGN_LEFT, 0); rightSizer->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); - + #endif //===================================================== // Control Toggles box @@ -445,8 +446,8 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const this->Connect(m_menuItemFilter->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsFilterUI)); this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg)); this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI)); - this->Connect(m_menuItemSetCallSign->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsSetCallSign)); - this->Connect(m_menuItemSetCallSign->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsSetCallSignUI)); + this->Connect(m_menuItemOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions)); + this->Connect(m_menuItemOptions->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI)); this->Connect(m_menuItemPlayFileToMicIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayFileToMicIn)); this->Connect(m_menuItemRecFileFromRadio->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnRecFileFromRadio)); @@ -501,6 +502,8 @@ TopFrame::~TopFrame() this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsFilterUI)); this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg)); this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI)); + this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions)); + this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI)); this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayFileToMicIn)); this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnRecFileFromRadio)); diff --git a/fdmdv2/src/topFrame.h b/fdmdv2/src/topFrame.h index 219fd053..5e914f8b 100644 --- a/fdmdv2/src/topFrame.h +++ b/fdmdv2/src/topFrame.h @@ -94,8 +94,6 @@ class TopFrame : public wxFrame wxStaticText* m_textSQ; wxStatusBar* m_statusBar1; - wxCheckBox *m_ckboxTestFrame; - wxButton* m_BtnBerReset; wxStaticText *m_textBits; wxStaticText *m_textErrors; @@ -120,8 +118,8 @@ class TopFrame : public wxFrame virtual void OnToolsAudioUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnToolsFilter( wxCommandEvent& event ) { event.Skip(); } virtual void OnToolsFilterUI( wxUpdateUIEvent& event ) { event.Skip(); } - virtual void OnToolsSetCallSign( wxCommandEvent& event ) { event.Skip(); } - virtual void OnToolsSetCallSignUI( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void OnToolsOptions( wxCommandEvent& event ) { event.Skip(); } + virtual void OnToolsOptionsUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnToolsComCfg( wxCommandEvent& event ) { event.Skip(); } virtual void OnToolsComCfgUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnPlayFileToMicIn( wxCommandEvent& event ) { event.Skip(); } diff --git a/fdmdv2/src/version.h b/fdmdv2/src/version.h index d5f43d54..5ebb6f5e 100644 --- a/fdmdv2/src/version.h +++ b/fdmdv2/src/version.h @@ -1,6 +1,6 @@ #ifndef FREEDV_VER_DOT_H #define FREEDV_VER_DOT_H 1 -#define FREEDV_VERSION "0.961 Beta" +#define FREEDV_VERSION "0.96.2 Beta" #endif //FREEDV_VER_DOT_H -- 2.25.1