mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Eliminate an overload of TieChoice...
... with one exception (/FileFormats/FFmpegAACProfile), the calls are replaced with TieNumberAsChoice. Some unfortunately repetitious string tables are a small price in exchange for reduced confusion in ShuttleGui.cpp Untranslated strings are passed to TieNumberAsChoice, which is wrong, but that will be made right in the next commit when we change the implementation of that function
This commit is contained in:
@@ -213,14 +213,6 @@ public:
|
||||
const wxArrayStringEx &Choices,
|
||||
const wxArrayStringEx & InternalChoices ) override;
|
||||
|
||||
// An assertion will be violated if this override is reached!
|
||||
wxChoice * TieChoice(
|
||||
const wxString &Prompt,
|
||||
const wxString &SettingName,
|
||||
const int Default,
|
||||
const wxArrayStringEx & Choices,
|
||||
const std::vector<int> & InternalChoices) override;
|
||||
|
||||
wxChoice * TieNumberAsChoice(
|
||||
const wxString &Prompt,
|
||||
const wxString &SettingName,
|
||||
@@ -310,34 +302,6 @@ wxChoice * ShuttleGuiGetDefinition::TieChoice(
|
||||
EndStruct();
|
||||
return ShuttleGui::TieChoice( Prompt, SettingName, Default, Choices, InternalChoices );
|
||||
}
|
||||
wxChoice * ShuttleGuiGetDefinition::TieChoice(
|
||||
const wxString &Prompt,
|
||||
const wxString &SettingName,
|
||||
const int Default,
|
||||
const wxArrayStringEx & Choices,
|
||||
const std::vector<int> & InternalChoices)
|
||||
{
|
||||
// Should no longer come here!
|
||||
// Choice controls in Preferences that really are exhaustive choices among
|
||||
// non-numerical options must now encode the internal choices as strings,
|
||||
// not numbers.
|
||||
wxASSERT(false);
|
||||
|
||||
// But if we do get here anyway, proceed sub-optimally as before.
|
||||
StartStruct();
|
||||
AddItem( SettingName, "id" );
|
||||
AddItem( Prompt, "prompt" );
|
||||
AddItem( "enum", "type" );
|
||||
AddItem( Default, "default" );
|
||||
StartField( "enum" );
|
||||
StartArray();
|
||||
for( size_t i=0;i<Choices.size(); i++ )
|
||||
AddItem( Choices[i] );
|
||||
EndArray();
|
||||
EndField();
|
||||
EndStruct();
|
||||
return ShuttleGui::TieChoice( Prompt, SettingName, Default, Choices, InternalChoices );
|
||||
}
|
||||
wxChoice * ShuttleGuiGetDefinition::TieNumberAsChoice(
|
||||
const wxString &Prompt,
|
||||
const wxString &SettingName,
|
||||
|
||||
Reference in New Issue
Block a user