mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
ShuttleGui::AddVariableText takes TranslatableString
This commit is contained in:
@@ -446,19 +446,22 @@ void ShuttleGuiBase::AddFixedText(const wxString &Str, bool bCenter, int wrapWid
|
||||
}
|
||||
|
||||
wxStaticText * ShuttleGuiBase::AddVariableText(
|
||||
const wxString &Str, bool bCenter, int PositionFlags, int wrapWidth )
|
||||
const TranslatableString &Str,
|
||||
bool bCenter, int PositionFlags, int wrapWidth )
|
||||
{
|
||||
const auto translated = Str.Translation();
|
||||
UseUpId();
|
||||
if( mShuttleMode != eIsCreating )
|
||||
return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxStaticText);
|
||||
|
||||
wxStaticText *pStatic;
|
||||
auto text = pStatic = safenew wxStaticText(GetParent(), miId, Str, wxDefaultPosition, wxDefaultSize,
|
||||
auto text = pStatic = safenew wxStaticText(GetParent(), miId, translated,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
GetStyle( wxALIGN_LEFT ));
|
||||
mpWind = text;
|
||||
if ( wrapWidth > 0 )
|
||||
text->Wrap( wrapWidth );
|
||||
mpWind->SetName(wxStripMenuCodes(Str)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
mpWind->SetName(wxStripMenuCodes(translated)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
if( bCenter )
|
||||
{
|
||||
miProp=1;
|
||||
|
||||
Reference in New Issue
Block a user