mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Remove Effect::PromptUser...
... it was only a thin wrapper of ShowInterface when not overridden, not clearly serving a distinct purpose.
This commit is contained in:
parent
fb678c0eb8
commit
738c5c5e90
@ -1200,7 +1200,9 @@ bool Effect::DoEffect(wxWindow *parent,
|
||||
// Prompting will be bypassed when applying an effect that has already
|
||||
// been configured, e.g. repeating the last effect on a different selection.
|
||||
// Prompting may call Effect::Preview
|
||||
if (shouldPrompt && IsInteractive() && !PromptUser(parent))
|
||||
if ( shouldPrompt &&
|
||||
IsInteractive() &&
|
||||
!ShowInterface(parent, IsBatchProcessing()) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -1244,12 +1246,6 @@ bool Effect::Init()
|
||||
return true;
|
||||
}
|
||||
|
||||
// Remove this method once NoiseReduction gets migrated
|
||||
bool Effect::PromptUser(wxWindow *parent)
|
||||
{
|
||||
return ShowInterface(parent, IsBatchProcessing());
|
||||
}
|
||||
|
||||
int Effect::GetPass()
|
||||
{
|
||||
return mPass;
|
||||
|
@ -287,12 +287,6 @@ protected:
|
||||
// return false otherwise
|
||||
virtual bool Init();
|
||||
|
||||
// If necessary, open a dialog to get parameters from the user.
|
||||
// This method will not always be called (for example if a user
|
||||
// repeats an effect) but if it is called, it will be called
|
||||
// after Init.
|
||||
virtual bool PromptUser(wxWindow *parent);
|
||||
|
||||
// Check whether effect should be skipped
|
||||
// Typically this is only useful in automation, for example
|
||||
// detecting that zero noise reduction is to be done,
|
||||
|
@ -523,7 +523,7 @@ bool EffectManager::PromptUser(const PluginID & ID, wxWindow *parent)
|
||||
|
||||
if (effect)
|
||||
{
|
||||
result = effect->PromptUser(parent);
|
||||
result = effect->ShowInterface( parent, effect->IsBatchProcessing() );
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,8 @@ void EffectRack::OnEditor(wxCommandEvent & evt)
|
||||
return;
|
||||
}
|
||||
|
||||
mEffects[index]->PromptUser(GetParent());
|
||||
auto pEffect = mEffects[index];
|
||||
pEffect->ShowInterface( GetParent(), pEffect->IsBatchProcessing() );
|
||||
}
|
||||
|
||||
void EffectRack::OnUp(wxCommandEvent & evt)
|
||||
|
@ -459,8 +459,10 @@ bool EffectNoiseReduction::CheckWhetherSkipEffect()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EffectNoiseReduction::PromptUser(wxWindow *parent)
|
||||
bool EffectNoiseReduction::ShowInterface( wxWindow *parent, bool )
|
||||
{
|
||||
// to do: use forceModal correctly
|
||||
|
||||
// We may want to twiddle the levels if we are setting
|
||||
// from an automation dialog, the only case in which we can
|
||||
// get here without any wavetracks.
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
// using Effect::TrackProgress;
|
||||
|
||||
bool PromptUser(wxWindow *parent) override;
|
||||
bool ShowInterface( wxWindow *parent, bool forceModal ) override;
|
||||
|
||||
bool Init() override;
|
||||
bool CheckWhetherSkipEffect() override;
|
||||
|
@ -149,8 +149,9 @@ bool EffectNoiseRemoval::CheckWhetherSkipEffect()
|
||||
return (mLevel == 0);
|
||||
}
|
||||
|
||||
bool EffectNoiseRemoval::PromptUser(wxWindow *parent)
|
||||
bool EffectNoiseRemoval::ShowInterface( wxWindow *parent, bool /* forceModal */ )
|
||||
{
|
||||
// to do: use forceModal correctly
|
||||
NoiseRemovalDialog dlog(this, parent);
|
||||
dlog.mSensitivity = mSensitivity;
|
||||
dlog.mGain = -mNoiseGain;
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
// Effect implementation
|
||||
|
||||
bool PromptUser(wxWindow *parent) override;
|
||||
bool ShowInterface( wxWindow *parent, bool forceModal ) override;
|
||||
bool Init() override;
|
||||
bool CheckWhetherSkipEffect() override;
|
||||
bool Process() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user