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

Move TX Mode column to left of Status in FreeDV Reporter window. #670

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading