| 915 | } |
| 916 | |
| 917 | void AppFrame::updateRecordingMenu() { |
| 918 | |
| 919 | // Recording path: |
| 920 | std::string recPath = wxGetApp().getConfig()->getRecordingPath(); |
| 921 | if (recPath.length() > 32) { |
| 922 | recPath = "..." + recPath.substr(recPath.length() - 32, 32); |
| 923 | } |
| 924 | |
| 925 | recordingMenuItems[wxID_RECORDING_PATH]->SetItemLabel(getSettingsLabel("Set Recording Path", recPath.empty() ? "<Not Set>" : recPath)); |
| 926 | |
| 927 | //Squelch options: |
| 928 | int squelchEnumValue = wxGetApp().getConfig()->getRecordingSquelchOption(); |
| 929 | |
| 930 | if (squelchEnumValue == AudioSinkFileThread::SQUELCH_RECORD_SILENCE) { |
| 931 | |
| 932 | recordingMenuItems[wxID_RECORDING_SQUELCH_SILENCE]->Check(true); |
| 933 | recordingMenuItems[wxID_RECORDING_SQUELCH_BASE]->SetItemLabel(getSettingsLabel("Squelch", "Record Silence")); |
| 934 | |
| 935 | } else if (squelchEnumValue == AudioSinkFileThread::SQUELCH_SKIP_SILENCE) { |
| 936 | |
| 937 | recordingMenuItems[wxID_RECORDING_SQUELCH_SKIP]->Check(true); |
| 938 | recordingMenuItems[wxID_RECORDING_SQUELCH_BASE]->SetItemLabel(getSettingsLabel("Squelch", "Skip Silence")); |
| 939 | |
| 940 | } else if (squelchEnumValue == AudioSinkFileThread::SQUELCH_RECORD_ALWAYS) { |
| 941 | |
| 942 | recordingMenuItems[wxID_RECORDING_SQUELCH_ALWAYS]->Check(true); |
| 943 | recordingMenuItems[wxID_RECORDING_SQUELCH_BASE]->SetItemLabel(getSettingsLabel("Squelch", "Record Always")); |
| 944 | } |
| 945 | else { |
| 946 | recordingMenuItems[wxID_RECORDING_SQUELCH_SILENCE]->Check(true); |
| 947 | recordingMenuItems[wxID_RECORDING_SQUELCH_BASE]->SetItemLabel(getSettingsLabel("Squelch", "Record Silence")); |
| 948 | |
| 949 | } |
| 950 | |
| 951 | //File time limit: |
| 952 | int fileTimeLimitSeconds = wxGetApp().getConfig()->getRecordingFileTimeLimit(); |
| 953 | |
| 954 | if (fileTimeLimitSeconds <= 0) { |
| 955 | |
| 956 | recordingMenuItems[wxID_RECORDING_FILE_TIME_LIMIT]->SetItemLabel(getSettingsLabel("File time limit","<Not Set>")); |
| 957 | } |
| 958 | else { |
| 959 | recordingMenuItems[wxID_RECORDING_FILE_TIME_LIMIT]->SetItemLabel(getSettingsLabel("File time limit", |
| 960 | std::to_string(fileTimeLimitSeconds), "s")); |
| 961 | } |
| 962 | } |
| 963 | |
| 964 | void AppFrame::initDeviceParams(SDRDeviceInfo *devInfo_in) { |
| 965 | devInfo = devInfo_in; |
nothing calls this directly
no test coverage detected