Skip to content

Commit

Permalink
Merge branch 'ms-external-vocoder' of github.com:drowe67/freedv-gui i…
Browse files Browse the repository at this point in the history
…nto ms-external-vocoder
  • Loading branch information
tmiw committed Sep 9, 2024
2 parents 6e787b7 + 4af9eee commit bc91145
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 4 deletions.
3 changes: 2 additions & 1 deletion USER_MANUAL.html
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,10 @@ <h2 data-number="18.1" id="v1.9.10-tbd-2024"><span class="header-section-number"
<li>Enhancements:
<ul>
<li>Show green line indicating RX frequency. (PR #725)</li>
<li>Update configuration of the Voice Keyer feature based on user feedback. (PR #730)</li>
<li>Update configuration of the Voice Keyer feature based on user feedback. (PR #730, #746)</li>
<li>Add monitor volume adjustment. (PR #733)</li>
<li>Avoid modifying the audio device configuration without the user explicitly doing so. (PR #735)</li>
<li>If provided by user, add config file to titlebar. (PR #738)</li>
</ul></li>
<li>Build system:
<ul>
Expand Down
3 changes: 2 additions & 1 deletion USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,10 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Fix bug preventing saving of the previously used path when playing back files. (PR #729)
2. Enhancements:
* Show green line indicating RX frequency. (PR #725)
* Update configuration of the Voice Keyer feature based on user feedback. (PR #730)
* Update configuration of the Voice Keyer feature based on user feedback. (PR #730, #746)
* Add monitor volume adjustment. (PR #733)
* Avoid modifying the audio device configuration without the user explicitly doing so. (PR #735)
* If provided by user, add config file to titlebar. (PR #738)
3. Build system:
* Allow overrriding the version tag when building. (PR #727)
* Update wxWidgets to 3.2.5. (PR #731)
Expand Down
Binary file modified USER_MANUAL.pdf
Binary file not shown.
9 changes: 8 additions & 1 deletion src/config/FreeDVConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,14 @@ void FreeDVConfiguration::load(wxConfigBase* config)
voiceKeyerWaveFilePath = path;
voiceKeyerWaveFile = name;
}

else
{
// Make sure path isn't in the filename
voiceKeyerWaveFile->Replace(voiceKeyerWaveFilePath, "");
voiceKeyerWaveFile->Replace("/", "");
voiceKeyerWaveFile->Replace("\\", "");
}

load_(config, voiceKeyerRxPause);
load_(config, voiceKeyerRepeats);

Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/dlg_audiooptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ void AudioOptsDialog::buildTestControls(PlotScalar **plotScalar, wxButton **btnT
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", title, wxGetApp().customConfigFileName));
}

if (g_verbose) fprintf(stderr, "pos %d %d\n", pos.x, pos.y);
audioEngineInit();

Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/dlg_easy_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ EasySetupDialog::EasySetupDialog(wxWindow* parent, wxWindowID id, const wxString
, serialPortTestObject_(nullptr)
, hasAppliedChanges_(false)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", title, wxGetApp().customConfigFileName));
}

// Create top-level of control hierarchy.
wxPanel* panel = new wxPanel(this);
wxBoxSizer* sectionSizer = new wxBoxSizer(wxVERTICAL);
Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/dlg_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ extern wxMutex g_mutexProtectingCallbackData;
FilterDlg::FilterDlg(wxWindow* parent, bool running, bool *newMicInFilter, bool *newSpkOutFilter,
wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", title, wxGetApp().customConfigFileName));
}

m_running = running;
m_newMicInFilter = newMicInFilter;
m_newSpkOutFilter = newSpkOutFilter;
Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/dlg_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ extern wxConfigBase *pConfig;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", title, wxGetApp().customConfigFileName));
}

sessionActive_ = false;

wxPanel* panel = new wxPanel(this);
Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/dlg_ptt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ extern wxConfigBase *pConfig;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", title, wxGetApp().customConfigFileName));
}

wxPanel* panel = new wxPanel(this);

wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
Expand Down
5 changes: 5 additions & 0 deletions src/gui/dialogs/freedv_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ FreeDVReporterDialog::FreeDVReporterDialog(wxWindow* parent, wxWindowID id, cons
, filterSelfMessageUpdates_(false)
, filteredFrequency_(0)
{
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", _("FreeDV Reporter"), wxGetApp().customConfigFileName));
}

for (int col = 0; col < NUM_COLS; col++)
{
columnLengths_[col] = DefaultColumnWidths_[col];
Expand Down
12 changes: 11 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ bool MainApp::OnCmdLineParsed(wxCmdLineParser& parser)
fprintf(stderr, "Loading configuration from %s\n", (const char*)configPath.ToUTF8());
pConfig = new wxFileConfig(wxT("FreeDV"), wxT("CODEC2-Project"), configPath, configPath, wxCONFIG_USE_LOCAL_FILE);
wxConfigBase::Set(pConfig);

// On Linux/macOS, this replaces $HOME with "~" to shorten the title a bit.
wxFileName fn(configPath);
customConfigFileName = fn.GetFullName();
}
pConfig->SetRecordDefaults();

Expand Down Expand Up @@ -240,7 +244,7 @@ bool MainApp::OnInit()
// displayed. But it doesn't when built from command line. Why?

frame->m_auiNbookCtrl->ChangeSelection(0);
frame->Layout();
frame->Layout();
frame->Show();
g_parent =frame;

Expand Down Expand Up @@ -650,6 +654,12 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent, wxID_ANY, _("FreeDV ")
pthread_setname_np(pthread_self(), "FreeDV GUI");
#endif // defined(__linux__)

// Add config file name to title bar if provided at the command line.
if (wxGetApp().customConfigFileName != "")
{
SetTitle(wxString::Format("%s (%s)", _("FreeDV ") + _(FREEDV_VERSION), wxGetApp().customConfigFileName));
}

m_reporterDialog = nullptr;
m_filterDialog = nullptr;

Expand Down
1 change: 1 addition & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class MainApp : public wxApp
bool CanAccessSerialPort(std::string portName);

FreeDVConfiguration appConfiguration;
wxString customConfigFileName;

// PTT -----------------------------------
unsigned int m_intHamlibRig;
Expand Down

0 comments on commit bc91145

Please sign in to comment.