Skip to content

Commit 7a9e156

Browse files
authored
Merge pull request #670 from drowe67/ms-tx-mode-col
Move TX Mode column to left of Status in FreeDV Reporter window.
2 parents f9e2338 + 2f665d3 commit 7a9e156

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

USER_MANUAL.md

+1
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
901901
* Add Frequency column to RX drop-down. (PR #663)
902902
* Update tooltip for the free form text field to indicate that it's not covered by FEC. (PR #665)
903903
* Enable use of space bar for PTT when in the FreeDV Reporter window. (PR #666)
904+
* Move TX Mode column to left of Status in FreeDV Reporter window. (PR #670)
904905
3. Code cleanup:
905906
* Move FreeDV Reporter dialog code to dialogs section of codebase. (PR #664)
906907

src/gui/dialogs/freedv_reporter.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ FreeDVReporterDialog::FreeDVReporterDialog(wxWindow* parent, wxWindowID id, cons
106106
col++;
107107
m_listSpots->InsertColumn(col, wxGetApp().appConfiguration.reportingConfiguration.reportingFrequencyAsKhz ? wxT("kHz") : wxT("MHz"), wxLIST_FORMAT_RIGHT, DefaultColumnWidths_[col]);
108108
col++;
109+
m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
110+
col++;
109111
m_listSpots->InsertColumn(col, wxT("Status"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
110112
col++;
111113
m_listSpots->InsertColumn(col, wxT("Msg"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
112114
col++;
113115
m_listSpots->InsertColumn(col, wxT("Last TX"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
114116
col++;
115-
m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
116-
col++;
117117
m_listSpots->InsertColumn(col, wxT("RX Call"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
118118
col++;
119119
m_listSpots->InsertColumn(col, wxT("Mode"), wxLIST_FORMAT_LEFT, DefaultColumnWidths_[col]);
@@ -1090,12 +1090,15 @@ int FreeDVReporterDialog::ListCompareFn_(wxIntPtr item1, wxIntPtr item2, wxIntPt
10901090
result = leftData->frequency - rightData->frequency;
10911091
break;
10921092
case 5:
1093-
result = leftData->status.CmpNoCase(rightData->status);
1093+
result = leftData->txMode.CmpNoCase(rightData->txMode);
10941094
break;
10951095
case 6:
1096-
result = leftData->userMessage.CmpNoCase(rightData->userMessage);
1096+
result = leftData->status.CmpNoCase(rightData->status);
10971097
break;
10981098
case 7:
1099+
result = leftData->userMessage.CmpNoCase(rightData->userMessage);
1100+
break;
1101+
case 8:
10991102
if (leftData->lastTxDate.IsValid() && rightData->lastTxDate.IsValid())
11001103
{
11011104
if (leftData->lastTxDate.IsEarlierThan(rightData->lastTxDate))
@@ -1124,9 +1127,6 @@ int FreeDVReporterDialog::ListCompareFn_(wxIntPtr item1, wxIntPtr item2, wxIntPt
11241127
result = 0;
11251128
}
11261129
break;
1127-
case 8:
1128-
result = leftData->txMode.CmpNoCase(rightData->txMode);
1129-
break;
11301130
case 9:
11311131
result = leftData->lastRxCallsign.CmpNoCase(rightData->lastRxCallsign);
11321132
break;
@@ -1661,6 +1661,9 @@ void FreeDVReporterDialog::addOrUpdateListIfNotFiltered_(ReporterData* data, std
16611661
changed = setColumnForRow_(itemIndex, col++, data->freqString, colResizeList);
16621662
needResort |= changed && currentSortColumn_ == (col - 1);
16631663

1664+
changed = setColumnForRow_(itemIndex, col++, " "+data->txMode, colResizeList);
1665+
needResort |= changed && currentSortColumn_ == (col - 1);
1666+
16641667
changed = setColumnForRow_(itemIndex, col++, " "+data->status, colResizeList);
16651668
needResort |= changed && currentSortColumn_ == (col - 1);
16661669

@@ -1670,9 +1673,6 @@ void FreeDVReporterDialog::addOrUpdateListIfNotFiltered_(ReporterData* data, std
16701673
changed = setColumnForRow_(itemIndex, col++, " "+data->lastTx, colResizeList);
16711674
needResort |= changed && currentSortColumn_ == (col - 1);
16721675

1673-
changed = setColumnForRow_(itemIndex, col++, " "+data->txMode, colResizeList);
1674-
needResort |= changed && currentSortColumn_ == (col - 1);
1675-
16761676
changed = setColumnForRow_(itemIndex, col++, " "+data->lastRxCallsign, colResizeList);
16771677
needResort |= changed && currentSortColumn_ == (col - 1);
16781678

0 commit comments

Comments
 (0)