Skip to content

Commit

Permalink
Merge pull request #670 from drowe67/ms-tx-mode-col
Browse files Browse the repository at this point in the history
Move TX Mode column to left of Status in FreeDV Reporter window.
  • Loading branch information
tmiw authored Jan 25, 2024
2 parents f9e2338 + 2f665d3 commit 7a9e156
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
20 changes: 10 additions & 10 deletions src/gui/dialogs/freedv_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 7a9e156

Please sign in to comment.