Skip to content

Commit

Permalink
Merge branch 'master' into ms-free-form-text-tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw authored Jan 24, 2024
2 parents f846406 + 4803687 commit 5425c7a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
2. Enhancements:
* Add Frequency column to RX drop-down. (PR #663)
* Update tooltip for the free form text field to indicate that it's not covered by FEC. (PR #665)
* Enable use of space bar for PTT when in the FreeDV Reporter window. (PR #666)
3. Code cleanup:
* Move FreeDV Reporter dialog code to dialogs section of codebase. (PR #664)

Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/freedv_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ FreeDVReporterDialog::~FreeDVReporterDialog()
m_bandFilter->Disconnect(wxEVT_TEXT, wxCommandEventHandler(FreeDVReporterDialog::OnBandFilterChange), NULL, this);
}

bool FreeDVReporterDialog::isTextMessageFieldInFocus()
{
return m_statusMessage->HasFocus();
}

void FreeDVReporterDialog::refreshLayout()
{
int colOffset = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/gui/dialogs/freedv_reporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class FreeDVReporterDialog : public wxDialog

void setBandFilter(FilterFrequency freq);

bool isTextMessageFieldInFocus();

protected:

// Handlers for events.
Expand Down
7 changes: 6 additions & 1 deletion src/ongui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,12 @@ int MainApp::FilterEvent(wxEvent& event)
(((wxKeyEvent&)event).GetKeyCode() == WXK_SPACE))
{
// only use space to toggle PTT if we are running and no modal dialogs (like options) up
if (frame->m_RxRunning && frame->IsActive() && wxGetApp().appConfiguration.enableSpaceBarForPTT && !frame->isReceiveOnly()) {
bool mainWindowActive = frame->IsActive();
bool reporterActiveButNotUpdatingTextMessage =
frame->m_reporterDialog != nullptr && frame->m_reporterDialog->IsActive() &&
!frame->m_reporterDialog->isTextMessageFieldInFocus();
if (frame->m_RxRunning && (mainWindowActive || reporterActiveButNotUpdatingTextMessage) &&
wxGetApp().appConfiguration.enableSpaceBarForPTT && !frame->isReceiveOnly()) {

// space bar controls rx/rx if keyer not running
if (frame->vk_state == VK_IDLE) {
Expand Down

0 comments on commit 5425c7a

Please sign in to comment.