fixed voice keyer path
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 15 Sep 2015 07:15:01 +0000 (07:15 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 15 Sep 2015 07:15:01 +0000 (07:15 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2334 01035d8c-6547-0410-b346-abe4f91aad63

freedv-dev/src/dlg_ptt.cpp
freedv-dev/src/fdmdv2_main.cpp
freedv-dev/src/fdmdv2_main.h

index 2b8f6ec975ac61fcd62a8f4a788d3c22be2a95ce..138f63f25f8b2f203e46d40b109661093775cca9 100644 (file)
@@ -457,7 +457,7 @@ void ComPortsDlg::OnApply(wxCommandEvent& event)
      wxFileDialog openFileDialog(
                                  this,
                                  wxT("Voice Keyer wave file"),
-                                 wxGetApp().m_txtVoiceKeyerWaveFile,
+                                 wxGetApp().m_txtVoiceKeyerWaveFilePath,
                                  wxEmptyString,
                                  wxT("WAV files (*.wav)|*.wav"),
                                  wxFD_SAVE
@@ -466,6 +466,9 @@ void ComPortsDlg::OnApply(wxCommandEvent& event)
          return;     // the user changed their mind...
      }
 
+     wxString fileName, extension;
+     wxGetApp().m_txtVoiceKeyerWaveFile = openFileDialog.GetPath();
+     wxFileName::SplitPath(wxGetApp().m_txtVoiceKeyerWaveFile, &wxGetApp().m_txtVoiceKeyerWaveFilePath, &fileName, &extension);
      m_txtCtrlVoiceKeyerWaveFile->SetValue(wxGetApp().m_txtVoiceKeyerWaveFile);
 }
 
index 1b3972233d1bdc47dce6f1199631e478efd9cb4b..a45414a0e2e2f9725a02d5af927b62f9fa32661b 100644 (file)
@@ -350,6 +350,7 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent)
     wxGetApp().m_boolHalfDuplex     = pConfig->ReadBool(wxT("/Rig/HalfDuplex"),     true);
     wxGetApp().m_leftChannelVoxTone = pConfig->ReadBool("/Rig/leftChannelVoxTone",  false);
  
+    wxGetApp().m_txtVoiceKeyerWaveFilePath = pConfig->Read(wxT("/VoiceKeyer/WaveFilePath"), wxT(""));
     wxGetApp().m_txtVoiceKeyerWaveFile = pConfig->Read(wxT("/VoiceKeyer/WaveFile"), wxT("voicekeyer.wav"));
     wxGetApp().m_intVoiceKeyerRxPause = pConfig->Read(wxT("/VoiceKeyer/RxPause"), 10);
     wxGetApp().m_intVoiceKeyerRepeats = pConfig->Read(wxT("/VoiceKeyer/Repeats"), 5);
@@ -595,6 +596,7 @@ MainFrame::~MainFrame()
         pConfig->Write(wxT("/Audio/soundCard2OutDeviceNum"),  g_soundCard2OutDeviceNum);
         pConfig->Write(wxT("/Audio/soundCard2SampleRate"),    g_soundCard2SampleRate );
 
+        pConfig->Write(wxT("/VoiceKeyer/WaveFilePath"), wxGetApp().m_txtVoiceKeyerWaveFilePath);
         pConfig->Write(wxT("/VoiceKeyer/WaveFile"), wxGetApp().m_txtVoiceKeyerWaveFile);
         pConfig->Write(wxT("/VoiceKeyer/RxPause"), wxGetApp().m_intVoiceKeyerRxPause);
         pConfig->Write(wxT("/VoiceKeyer/Repeats"), wxGetApp().m_intVoiceKeyerRepeats);
index 72908f557c36617852822280d517e1fde778be66..42a0b2bda51c9ff80a48ee35ee07cbbfccefd213 100644 (file)
@@ -174,6 +174,7 @@ class MainApp : public wxApp
 
         bool                m_boolHalfDuplex;
 
+        wxString            m_txtVoiceKeyerWaveFilePath;
         wxString            m_txtVoiceKeyerWaveFile;
         int                 m_intVoiceKeyerRxPause;
         int                 m_intVoiceKeyerRepeats;