From 8b1b07619d6c5b664a59d21f5e18564c736c66f5 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Wed, 24 Jan 2024 21:36:52 -0800 Subject: [PATCH 1/2] Move TX Mode column to left of Status in FreeDV Reporter window. --- src/gui/dialogs/freedv_reporter.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/dialogs/freedv_reporter.cpp b/src/gui/dialogs/freedv_reporter.cpp index b89720cdb..433fc07eb 100644 --- a/src/gui/dialogs/freedv_reporter.cpp +++ b/src/gui/dialogs/freedv_reporter.cpp @@ -106,14 +106,14 @@ FreeDVReporterDialog::FreeDVReporterDialog(wxWindow* parent, wxWindowID id, cons col++; m_listSpots->InsertColumn(col, wxGetApp().appConfiguration.reportingConfiguration.reportingFrequencyAsKhz ? wxT("kHz") : wxT("MHz"), wxLIST_FORMAT_RIGHT, DefaultColumnWidths_[col]); col++; + m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); + col++; m_listSpots->InsertColumn(col, wxT("Status"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); col++; m_listSpots->InsertColumn(col, wxT("Msg"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); col++; m_listSpots->InsertColumn(col, wxT("Last TX"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); col++; - m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); - col++; m_listSpots->InsertColumn(col, wxT("RX Call"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); col++; m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]); @@ -1090,12 +1090,15 @@ int FreeDVReporterDialog::ListCompareFn_(wxIntPtr item1, wxIntPtr item2, wxIntPt result = leftData->frequency - rightData->frequency; break; case 5: - result = leftData->status.CmpNoCase(rightData->status); + result = leftData->txMode.CmpNoCase(rightData->txMode); break; case 6: - result = leftData->userMessage.CmpNoCase(rightData->userMessage); + result = leftData->status.CmpNoCase(rightData->status); break; case 7: + result = leftData->userMessage.CmpNoCase(rightData->userMessage); + break; + case 8: if (leftData->lastTxDate.IsValid() && rightData->lastTxDate.IsValid()) { if (leftData->lastTxDate.IsEarlierThan(rightData->lastTxDate)) @@ -1124,9 +1127,6 @@ int FreeDVReporterDialog::ListCompareFn_(wxIntPtr item1, wxIntPtr item2, wxIntPt result = 0; } break; - case 8: - result = leftData->txMode.CmpNoCase(rightData->txMode); - break; case 9: result = leftData->lastRxCallsign.CmpNoCase(rightData->lastRxCallsign); break; @@ -1661,6 +1661,9 @@ void FreeDVReporterDialog::addOrUpdateListIfNotFiltered_(ReporterData* data, std changed = setColumnForRow_(itemIndex, col++, data->freqString, colResizeList); needResort |= changed && currentSortColumn_ == (col - 1); + changed = setColumnForRow_(itemIndex, col++, " "+data->txMode, colResizeList); + needResort |= changed && currentSortColumn_ == (col - 1); + changed = setColumnForRow_(itemIndex, col++, " "+data->status, colResizeList); needResort |= changed && currentSortColumn_ == (col - 1); @@ -1670,9 +1673,6 @@ void FreeDVReporterDialog::addOrUpdateListIfNotFiltered_(ReporterData* data, std changed = setColumnForRow_(itemIndex, col++, " "+data->lastTx, colResizeList); needResort |= changed && currentSortColumn_ == (col - 1); - changed = setColumnForRow_(itemIndex, col++, " "+data->txMode, colResizeList); - needResort |= changed && currentSortColumn_ == (col - 1); - changed = setColumnForRow_(itemIndex, col++, " "+data->lastRxCallsign, colResizeList); needResort |= changed && currentSortColumn_ == (col - 1); From 2f665d38f34d1bbabd706a022589b757f47a2efd Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Wed, 24 Jan 2024 21:37:50 -0800 Subject: [PATCH 2/2] Add PR #670 to changelog. --- USER_MANUAL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 236133c7a..71b546a94 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -901,6 +901,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes * 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) + * Move TX Mode column to left of Status in FreeDV Reporter window. (PR #670) 3. Code cleanup: * Move FreeDV Reporter dialog code to dialogs section of codebase. (PR #664)