Fix Bug 432: Cleanspeech mode will now not activate, even if it was enabled in a previous version (and even if it has been deliberately added to audacity.cfg).
This commit is contained in:
parent
1f17e0bb45
commit
860e19ae47
|
@ -1016,7 +1016,8 @@ void AudacityProject::UpdatePrefsVariables()
|
|||
gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &mShowId3Dialog, true);
|
||||
gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false);
|
||||
|
||||
gPrefs->Read(wxT("/Batch/CleanSpeechMode"), &mCleanSpeechMode, false);
|
||||
//gPrefs->Read(wxT("/Batch/CleanSpeechMode"), &mCleanSpeechMode, false);
|
||||
mCleanSpeechMode = false;
|
||||
|
||||
gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo.bUpdateTrackIndicator, true);
|
||||
gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true );
|
||||
|
|
|
@ -122,7 +122,8 @@ void EffectNoiseRemoval::CleanSpeechMayReadNoisegate()
|
|||
// and it exists
|
||||
AudacityProject * project = GetActiveProject();
|
||||
if (project == NULL) {
|
||||
int mode = gPrefs->Read(wxT("/Batch/CleanSpeechMode"), 0L);
|
||||
//int mode = gPrefs->Read(wxT("/Batch/CleanSpeechMode"), 0L);
|
||||
int mode = 0;
|
||||
if (mode == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ void BatchPrefs::PopulateOrExchange( ShuttleGui & S )
|
|||
S.TieCheckBox( _("&Don't apply effects in batch mode"),
|
||||
wxT("/Batch/Debug"), false);
|
||||
#endif
|
||||
S.TieCheckBox( _("Cl&eanSpeech Mode (Customized GUI)"),
|
||||
wxT("/Batch/CleanSpeechMode"), false);
|
||||
// S.TieCheckBox( _("Cl&eanSpeech Mode (Customized GUI)"),
|
||||
// wxT("/Batch/CleanSpeechMode"), false);
|
||||
}
|
||||
S.EndStatic();
|
||||
S.EndHorizontalLay();
|
||||
|
@ -105,7 +105,8 @@ bool BatchPrefs::Apply()
|
|||
PopulateOrExchange( S );
|
||||
|
||||
unsigned mode;
|
||||
mode = gPrefs->Read(wxT("/Batch/CleanSpeechMode"), 1L);
|
||||
//mode = gPrefs->Read(wxT("/Batch/CleanSpeechMode"), 1L);
|
||||
mode = 0;
|
||||
for(unsigned i=0; i<gAudacityProjects.GetCount(); i++)
|
||||
if(gAudacityProjects[i])
|
||||
{
|
||||
|
|
|
@ -94,7 +94,8 @@ ControlToolBar::ControlToolBar()
|
|||
mCutPreviewTracks = NULL;
|
||||
|
||||
gPrefs->Read(wxT("/GUI/ErgonomicTransportButtons"), &mErgonomicTransportButtons, true);
|
||||
gPrefs->Read(wxT("/Batch/CleanSpeechMode"), &mCleanSpeechMode, false);
|
||||
// gPrefs->Read(wxT("/Batch/CleanSpeechMode"), &mCleanSpeechMode, false);
|
||||
mCleanSpeechMode = false;
|
||||
}
|
||||
|
||||
ControlToolBar::~ControlToolBar()
|
||||
|
@ -193,8 +194,8 @@ void ControlToolBar::Populate()
|
|||
ID_RECORD_BUTTON, true, _("Record"));
|
||||
|
||||
/* i18n-hint: (verb)*/
|
||||
mBatch = MakeButton(bmpCleanSpeech, bmpCleanSpeech, bmpCleanSpeechDisabled,
|
||||
ID_BATCH_BUTTON, false, _("Clean Speech"));
|
||||
// mBatch = MakeButton(bmpCleanSpeech, bmpCleanSpeech, bmpCleanSpeechDisabled,
|
||||
// ID_BATCH_BUTTON, false, _("Clean Speech"));
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
RegenerateToolsTooltips();
|
||||
|
@ -215,7 +216,7 @@ void ControlToolBar::RegenerateToolsTooltips()
|
|||
mRewind->SetToolTip(_("Skip to Start"));
|
||||
mFF->SetToolTip(_("Skip to End"));
|
||||
mRecord->SetToolTip(_("Record (Shift for Append Record)"));
|
||||
mBatch->SetToolTip(_("Clean Speech"));
|
||||
// mBatch->SetToolTip(_("Clean Speech"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -233,7 +234,8 @@ void ControlToolBar::UpdatePrefs()
|
|||
updated = true;
|
||||
}
|
||||
|
||||
gPrefs->Read( wxT("/Batch/CleanSpeechMode"), &active, false );
|
||||
//gPrefs->Read( wxT("/Batch/CleanSpeechMode"), &active, false );
|
||||
active = false;
|
||||
if( mCleanSpeechMode != active )
|
||||
{
|
||||
mCleanSpeechMode = active;
|
||||
|
@ -302,8 +304,8 @@ void ControlToolBar::ArrangeButtons()
|
|||
}
|
||||
|
||||
// Add and possible hide the CleanSpeech button
|
||||
mSizer->Add( mBatch, 0, flags | wxLEFT, 5 );
|
||||
mSizer->Show( mBatch, mCleanSpeechMode );
|
||||
// mSizer->Add( mBatch, 0, flags | wxLEFT, 5 );
|
||||
// mSizer->Show( mBatch, mCleanSpeechMode );
|
||||
|
||||
// Layout the sizer
|
||||
mSizer->Layout();
|
||||
|
@ -349,7 +351,8 @@ void ControlToolBar::EnableDisableButtons()
|
|||
AudacityProject *p = GetActiveProject();
|
||||
size_t numProjects = gAudacityProjects.Count();
|
||||
bool tracks = false;
|
||||
bool cleaningSpeech = mBatch->IsDown();
|
||||
// bool cleaningSpeech = mBatch->IsDown();
|
||||
bool cleaningSpeech = false;
|
||||
bool playing = mPlay->IsDown();
|
||||
bool recording = mRecord->IsDown();
|
||||
bool busy = gAudioIO->IsBusy() || playing || recording;
|
||||
|
@ -378,7 +381,7 @@ void ControlToolBar::EnableDisableButtons()
|
|||
canRecord &= !busy;
|
||||
canRecord &= ((numProjects == 0) || ((numProjects == 1) && !tracks));
|
||||
mRecord->SetEnabled(canRecord);
|
||||
mBatch->SetEnabled(!busy && !recording);
|
||||
//mBatch->SetEnabled(!busy && !recording);
|
||||
}
|
||||
|
||||
mStop->SetEnabled(busy && !cleaningSpeech);
|
||||
|
@ -751,8 +754,8 @@ void ControlToolBar::OnBatch(wxCommandEvent &evt)
|
|||
mRewind->Enable();
|
||||
mFF->Enable();
|
||||
mPause->Disable();
|
||||
mBatch->Enable();
|
||||
mBatch->PopUp();
|
||||
//mBatch->Enable();
|
||||
//mBatch->PopUp();
|
||||
}
|
||||
|
||||
void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
||||
|
|
|
@ -110,7 +110,7 @@ class ControlToolBar:public ToolBar {
|
|||
|
||||
AButton *mRewind;
|
||||
AButton *mPlay;
|
||||
AButton *mBatch;
|
||||
//AButton *mBatch;
|
||||
AButton *mRecord;
|
||||
AButton *mPause;
|
||||
AButton *mStop;
|
||||
|
@ -126,7 +126,7 @@ class ControlToolBar:public ToolBar {
|
|||
// Show/hide cleanspeech button
|
||||
bool mCleanSpeechMode;
|
||||
|
||||
wxBoxSizer *mBatchGroup;
|
||||
//wxBoxSizer *mBatchGroup;
|
||||
wxBoxSizer *mSizer;
|
||||
|
||||
TrackList* mCutPreviewTracks;
|
||||
|
|
|
@ -117,7 +117,7 @@ ToolBar::~ToolBar()
|
|||
//
|
||||
wxString ToolBar::GetTitle()
|
||||
{
|
||||
/* i18n-hint: %s will be replaced by the version number.*/
|
||||
/* i18n-hint: %s will be replaced by the name of the kind of toolbar.*/
|
||||
return wxString::Format( _("Audacity %s ToolBar"), GetLabel().c_str() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue