Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Help button on the main window. #607

Merged
merged 11 commits into from
Nov 17, 2023
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ endif(APPLE)

# Adds a tag to the end of the version string. Leave empty
# for official release builds.
set(FREEDV_VERSION_TAG "devel")
set(FREEDV_VERSION_TAG "")

# Prevent in-source builds to protect automake/autoconf config.
# If an in-source build is attempted, you will still need to clean up a few
Expand Down
7 changes: 5 additions & 2 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes

# Release Notes

## V1.9.5 TBD 2023
## V1.9.5 November 2023

1. Bugfixes:
* Fix bug preventing frequency updates from being properly suppressed when frequency control is in focus. (PR #585)
Expand All @@ -927,7 +927,10 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Add ability to double-click FreeDV Reporter entries to change the radio's frequency. (PR #592)
* FreeDV Reporter: Add ability to force RX Only reporting in Tools->Options. (PR #599)
* Add new 160m/80m/40m calling frequencies for IARU R2. (PR #601)
3. Other:
* Add Help button to allow users to get help more easily. (PR #607)
3. Build system:
* Upgrade wxWidgets to 3.2.4. (PR #607)
4. Other:
* Report OS usage to FreeDV Reporter. (PR #606)

## V1.9.4 October 2023
Expand Down
2 changes: 1 addition & 1 deletion cmake/BuildWxWidgets.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(WXWIDGETS_VERSION "3.2.3")
set(WXWIDGETS_VERSION "3.2.4")

# Ensure that the wxWidgets library is staticly built.
set(wxBUILD_SHARED OFF CACHE BOOL "Build wx libraries as shared libs")
Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ class MainFrame : public TopFrame
void OnTogBtnVoiceKeyerClick (wxCommandEvent& event) override;
void OnTogBtnVoiceKeyerRightClick( wxContextMenuEvent& event ) override;

void OnHelp( wxCommandEvent& event ) override;

void OnTogBtnOnOff( wxCommandEvent& event ) override;
void OnTogBtnRecord( wxCommandEvent& event ) override;

Expand Down
8 changes: 8 additions & 0 deletions src/ongui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,14 @@ void MainFrame::OnHelpManual( wxCommandEvent& event )
wxLaunchDefaultBrowser("https://github.com/drowe67/freedv-gui/blob/master/USER_MANUAL.pdf");
}

//-------------------------------------------------------------------------
// OnHelp()
//-------------------------------------------------------------------------
void MainFrame::OnHelp( wxCommandEvent& event )
{
wxLaunchDefaultBrowser("https://freedv.org/#gethelp");
}

//-------------------------------------------------------------------------
//OnHelpAbout()
//-------------------------------------------------------------------------
Expand Down
86 changes: 51 additions & 35 deletions src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
//=====================================================
// Left side
//=====================================================
wxSizer* leftOuterSizer = new wxBoxSizer(wxVERTICAL);
wxSizer* leftSizer = new wxWrapSizer(wxVERTICAL);

wxStaticBoxSizer* snrSizer;
Expand All @@ -421,7 +422,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
//------------------------------
// S/N ratio Gauge (vert. bargraph)
//------------------------------
m_gaugeSNR = new wxGauge(snrBox, wxID_ANY, 25, wxDefaultPosition, wxSize(15,150), wxGA_SMOOTH|wxGA_VERTICAL);
m_gaugeSNR = new wxGauge(snrBox, wxID_ANY, 25, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
m_gaugeSNR->SetToolTip(_("Displays signal to noise ratio in dB."));
snrSizer->Add(m_gaugeSNR, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);

Expand All @@ -439,7 +440,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_ckboxSNR->SetToolTip(_("Smooth but slow SNR estimation"));
snrSizer->Add(m_ckboxSNR, 0, wxALIGN_CENTER_HORIZONTAL, 5);

leftSizer->Add(snrSizer, 2, wxEXPAND|wxALL, 1);
leftSizer->Add(snrSizer, 2, wxEXPAND|wxALL, 2);

//------------------------------
// Sync Indicator box
Expand All @@ -457,9 +458,9 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_textCurrentDecodeMode->Disable();

m_BtnReSync = new wxButton(syncBox, wxID_ANY, _("ReS&ync"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer3_33->Add(m_BtnReSync, 0, wxALIGN_CENTRE , 1);
sbSizer3_33->Add(m_BtnReSync, 0, wxALL | wxALIGN_CENTRE, 5);

leftSizer->Add(sbSizer3_33,0, wxALL|wxEXPAND, 3);
leftSizer->Add(sbSizer3_33,0, wxALL|wxEXPAND, 2);

//------------------------------
// Audio Recording/Playback
Expand All @@ -469,9 +470,9 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const

m_audioRecord = new wxToggleButton(audioBox, wxID_ANY, _("Record"), wxDefaultPosition, wxDefaultSize, 0);
m_audioRecord->SetToolTip(_("Records incoming over the air signals as well as anything transmitted."));
sbSizerAudioRecordPlay->Add(m_audioRecord, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 1);
sbSizerAudioRecordPlay->Add(m_audioRecord, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 5);

leftSizer->Add(sbSizerAudioRecordPlay, 0, wxALL|wxEXPAND, 3);
leftSizer->Add(sbSizerAudioRecordPlay, 0, wxALL|wxEXPAND, 2);

//------------------------------
// BER Frames box
Expand All @@ -482,27 +483,27 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
sbSizer_ber = new wxStaticBoxSizer(statsBox, wxVERTICAL);

m_BtnBerReset = new wxButton(statsBox, wxID_ANY, _("&Reset"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_ber->Add(m_BtnBerReset, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
sbSizer_ber->Add(m_BtnBerReset, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

m_textBits = new wxStaticText(statsBox, wxID_ANY, wxT("Bits: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textBits, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textBits, 0, wxALL | wxALIGN_LEFT, 1);
m_textErrors = new wxStaticText(statsBox, wxID_ANY, wxT("Errs: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textErrors, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textErrors, 0, wxALL | wxALIGN_LEFT, 1);
m_textBER = new wxStaticText(statsBox, wxID_ANY, wxT("BER: 0.0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textBER, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textBER, 0, wxALL | wxALIGN_LEFT, 1);
m_textResyncs = new wxStaticText(statsBox, wxID_ANY, wxT("Resyncs: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textResyncs, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textResyncs, 0, wxALL | wxALIGN_LEFT, 1);
m_textClockOffset = new wxStaticText(statsBox, wxID_ANY, wxT("ClkOff: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
m_textClockOffset->SetMinSize(wxSize(125,-1));
sbSizer_ber->Add(m_textClockOffset, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textClockOffset, 0, wxALL | wxALIGN_LEFT, 1);
m_textFreqOffset = new wxStaticText(statsBox, wxID_ANY, wxT("FreqOff: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textFreqOffset, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textFreqOffset, 0, wxALL | wxALIGN_LEFT, 1);
m_textSyncMetric = new wxStaticText(statsBox, wxID_ANY, wxT("Sync: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textSyncMetric, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textSyncMetric, 0, wxALL | wxALIGN_LEFT, 1);
m_textCodec2Var = new wxStaticText(statsBox, wxID_ANY, wxT("Var: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textCodec2Var, 0, wxALIGN_LEFT, 1);
sbSizer_ber->Add(m_textCodec2Var, 0, wxALL | wxALIGN_LEFT, 1);

leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND, 3);
leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND, 2);

//------------------------------
// Signal Level(vert. bargraph)
Expand All @@ -519,9 +520,21 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_gaugeLevel->SetToolTip(_("Peak of From Radio in Rx, or peak of From Mic in Tx mode. If Red you should reduce your levels"));
levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);

leftSizer->Add(levelSizer, 2, wxALL|wxEXPAND, 1);
leftSizer->Add(levelSizer, 2, wxALL|wxEXPAND, 2);

//------------------------------
// Help button: goes to Help page on website
//------------------------------
wxStaticBox* helpBox = new wxStaticBox(m_panel, wxID_ANY, _("Assistance"));
wxStaticBoxSizer* helpSizer = new wxStaticBoxSizer(helpBox, wxVERTICAL);

m_btnHelp = new wxButton(helpBox, wxID_ANY, _("Get Help"), wxDefaultPosition, wxDefaultSize, 0);
m_btnHelp->SetToolTip(_("Get help with FreeDV."));
helpSizer->Add(m_btnHelp, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
leftOuterSizer->Add(leftSizer, 2, wxALL | wxEXPAND, 1);
leftOuterSizer->Add(helpSizer, 0, wxFIXED_MINSIZE | wxALL | wxEXPAND, 1);

bSizer1->Add(leftSizer, 0, wxALL|wxEXPAND, 5);
bSizer1->Add(leftOuterSizer, 0, wxALL|wxEXPAND, 5);

//=====================================================
// Center Section
Expand Down Expand Up @@ -620,7 +633,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_ckboxSQ = new wxCheckBox(squelchBox, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);

sbSizer3->Add(m_ckboxSQ, 0, wxALIGN_CENTER_HORIZONTAL, 0);
rightSizer->Add(sbSizer3, 2, wxEXPAND, 0);
rightSizer->Add(sbSizer3, 2, wxALL | wxEXPAND, 2);

// Transmit Level slider
wxBoxSizer* txLevelSizer = new wxStaticBoxSizer(new wxStaticBox(m_panel, wxID_ANY, _("TX &Attenuation"), wxDefaultPosition, wxSize(150,-1)), wxVERTICAL);
Expand All @@ -643,7 +656,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_txtTxLevelNum->SetMinSize(wxSize(100,-1));
txLevelSizer->Add(m_txtTxLevelNum, 0, wxALIGN_CENTER_HORIZONTAL, 0);

rightSizer->Add(txLevelSizer, 2, wxEXPAND, 0);
rightSizer->Add(txLevelSizer, 2, wxALL | wxEXPAND, 2);

/* new --- */

Expand Down Expand Up @@ -686,11 +699,11 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_hiddenMode1->SetValue(true);
m_hiddenMode2->SetValue(true);

sbSizer_mode->SetMinSize(wxSize(175,250));
sbSizer_mode->SetMinSize(wxSize(175,225));
otherModeWin->SetSizer(otherModeSizer);
otherModeSizer->SetSizeHints(otherModeWin);

rightSizer->Add(sbSizer_mode,0, wxEXPAND, 3);
rightSizer->Add(sbSizer_mode,0, wxALL | wxEXPAND, 2);

//=====================================================
// Control Toggles box
Expand All @@ -706,8 +719,8 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
//-------------------------------
m_togBtnOnOff = new wxToggleButton(controlBox, wxID_ANY, _("&Start"), wxDefaultPosition, wxDefaultSize, 0);
m_togBtnOnOff->SetToolTip(_("Begin/End receiving data."));
bSizer1511->Add(m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
sbSizer5->Add(bSizer1511, 0, wxEXPAND, 1);
bSizer1511->Add(m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 2);
sbSizer5->Add(bSizer1511, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, 1);

wxBoxSizer* bSizer13;
bSizer13 = new wxBoxSizer(wxVERTICAL);
Expand All @@ -717,7 +730,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
//------------------------------
m_togBtnAnalog = new wxToggleButton(controlBox, wxID_ANY, _("A&nalog"), wxDefaultPosition, wxDefaultSize, 0);
m_togBtnAnalog->SetToolTip(_("Toggle analog/digital operation."));
bSizer13->Add(m_togBtnAnalog, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
bSizer13->Add(m_togBtnAnalog, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 2);
sbSizer5->Add(bSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);

//------------------------------
Expand All @@ -726,7 +739,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_togBtnVoiceKeyer = new wxToggleButton(controlBox, wxID_ANY, _("Voice &Keyer"), wxDefaultPosition, wxDefaultSize, 0);
m_togBtnVoiceKeyer->SetToolTip(_("Toggle Voice Keyer. Right-click for additional options."));
wxBoxSizer* bSizer13a = new wxBoxSizer(wxVERTICAL);
bSizer13a->Add(m_togBtnVoiceKeyer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
bSizer13a->Add(m_togBtnVoiceKeyer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 2);
sbSizer5->Add(bSizer13a, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);

//------------------------------
Expand All @@ -736,10 +749,11 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
bSizer11 = new wxBoxSizer(wxVERTICAL);
m_btnTogPTT = new wxToggleButton(controlBox, wxID_ANY, _("&PTT"), wxDefaultPosition, wxDefaultSize, 0);
m_btnTogPTT->SetToolTip(_("Push to Talk - Switch between Receive and Transmit. Right-click for additional options."));
bSizer11->Add(m_btnTogPTT, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
sbSizer5->Add(bSizer11, 2, wxEXPAND, 1);
rightSizer->Add(sbSizer5, 2, wxALL|wxEXPAND, 1);

bSizer11->Add(m_btnTogPTT, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 2);
sbSizer5->Add(bSizer11, 0, wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, 1);

rightSizer->Add(sbSizer5, 2, wxALL|wxEXPAND, 2);

// Frequency text field (PSK Reporter)
m_freqBox = new wxStaticBox(m_panel, wxID_ANY, _("Report Frequency"));
wxBoxSizer* reportFrequencySizer = new wxStaticBoxSizer(m_freqBox, wxHORIZONTAL);
Expand All @@ -749,20 +763,20 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const

m_cboReportFrequency = new wxComboBox(m_freqBox, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN | wxTE_PROCESS_ENTER);
m_cboReportFrequency->SetMinSize(wxSize(150,-1));
txtReportFreqSizer->Add(m_cboReportFrequency, 1, 0, 1);
txtReportFreqSizer->Add(m_cboReportFrequency, 1, wxALL, 5);

reportFrequencySizer->Add(txtReportFreqSizer, 1, wxEXPAND, 1);
reportFrequencySizer->Add(reportFrequencyUnits, 0, wxALIGN_CENTER_VERTICAL, 1);

rightSizer->Add(reportFrequencySizer, 0, wxALL, 1);
rightSizer->Add(reportFrequencySizer, 0, wxALL, 2);

bSizer1->Add(rightSizer, 0, wxALL|wxEXPAND, 3);

m_panel->SetSizerAndFit(bSizer1);
this->Layout();

m_statusBar1 = this->CreateStatusBar(1, wxSTB_DEFAULT_STYLE, wxID_ANY);

//=====================================================
// End of layout
//=====================================================
Expand Down Expand Up @@ -835,7 +849,8 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_togBtnVoiceKeyer->Connect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(TopFrame::OnTogBtnVoiceKeyerRightClick), NULL, this);
m_btnTogPTT->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnPTT), NULL, this);
m_btnTogPTT->Connect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(TopFrame::OnTogBtnPTTRightClick), NULL, this);

m_btnHelp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnHelp), NULL, this);

m_BtnCallSignReset->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnCallSignReset), NULL, this);
m_BtnBerReset->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnBerReset), NULL, this);
m_BtnReSync->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnReSync), NULL, this);
Expand Down Expand Up @@ -917,7 +932,8 @@ TopFrame::~TopFrame()
m_togBtnVoiceKeyer->Disconnect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(TopFrame::OnTogBtnVoiceKeyerRightClick), NULL, this);
m_btnTogPTT->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnPTT), NULL, this);
m_btnTogPTT->Disconnect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(TopFrame::OnTogBtnPTTRightClick), NULL, this);

m_btnHelp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnHelp), NULL, this);

m_audioRecord->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnRecord), NULL, this);

m_rb700c->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(TopFrame::OnChangeTxMode), NULL, this);
Expand Down
3 changes: 3 additions & 0 deletions src/topFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ class TopFrame : public wxFrame

virtual void OnTogBtnPTT( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTogBtnPTTRightClick( wxContextMenuEvent& event ) { event.Skip(); }

virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }

virtual void OnTogBtnRecord( wxCommandEvent& event ) { event.Skip(); }

Expand Down Expand Up @@ -226,6 +228,7 @@ class TopFrame : public wxFrame
wxToggleButton* m_togBtnAnalog;
wxToggleButton* m_togBtnVoiceKeyer;
wxToggleButton* m_btnTogPTT;
wxButton* m_btnHelp;
wxAuiNotebook* m_auiNbookCtrl;
wxComboBox* m_cboReportFrequency;
wxStaticBox* m_freqBox;
Expand Down
Loading