1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Remove style argument from ShuttleGui::AddCombo & AddListBox...

... use the Style() chain-call instead, as needed
This commit is contained in:
Paul Licameli 2019-11-17 21:24:01 -05:00
parent 1bfbfb9640
commit 30d375d6fa
3 changed files with 9 additions and 7 deletions

View File

@ -466,7 +466,7 @@ wxStaticText * ShuttleGuiBase::AddVariableText(const wxString &Str, bool bCenter
return pStatic;
}
wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices, long style )
wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices )
{
HandleOptionality( Prompt );
AddPrompt( Prompt );
@ -486,7 +486,7 @@ wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &S
}
mpWind = pCombo = safenew wxComboBox(GetParent(), miId, Selected, wxDefaultPosition, wxDefaultSize,
n, Choices, GetStyle( style ));
n, Choices, GetStyle( 0 ));
mpWind->SetName(wxStripMenuCodes(Prompt));
UpdateSizers();
@ -683,7 +683,7 @@ void ShuttleGuiBase::AddConstTextBox(const wxString &Prompt, const wxString &Val
UpdateSizers();
}
wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices, long style)
wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices)
{
UseUpId();
if( mShuttleMode != eIsCreating )
@ -691,7 +691,7 @@ wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices, long styl
wxListBox * pListBox;
SetProportions( 1 );
mpWind = pListBox = safenew wxListBox(GetParent(), miId,
wxDefaultPosition, wxDefaultSize, choices, style);
wxDefaultPosition, wxDefaultSize, choices, GetStyle(0));
pListBox->SetMinSize( wxSize( 120,150 ));
UpdateSizers();
return pListBox;

View File

@ -223,7 +223,7 @@ public:
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars);
wxTextCtrl * AddNumericTextBox(const wxString &Caption, const wxString &Value, const int nChars);
wxTextCtrl * AddTextWindow(const wxString &Value);
wxListBox * AddListBox(const wxArrayStringEx &choices, long style = 0);
wxListBox * AddListBox(const wxArrayStringEx &choices);
struct ListControlColumn{
ListControlColumn(
@ -247,7 +247,7 @@ public:
wxGrid * AddGrid();
wxCheckBox * AddCheckBox( const wxString &Prompt, bool Selected);
wxCheckBox * AddCheckBoxOnRight( const wxString &Prompt, bool Selected);
wxComboBox * AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices, long style = 0 );
wxComboBox * AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices );
wxChoice * AddChoice( const wxString &Prompt,
const wxArrayStringEx &choices, int Selected = -1 );
wxChoice * AddChoice( const wxString &Prompt,

View File

@ -3753,7 +3753,9 @@ EffectPresetsDialog::EffectPresetsDialog(wxWindow *parent, Effect *effect)
mType = S.Id(ID_Type).AddChoice( {}, {}, 0 );
S.AddPrompt(_("&Preset:"));
mPresets = S.AddListBox( {}, wxLB_SINGLE | wxLB_NEEDED_SB );
mPresets = S
.Style( wxLB_SINGLE | wxLB_NEEDED_SB )
.AddListBox( {} );
}
S.EndTwoColumn();