1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

TranslatableString for names, labels, tooltips of wxPanelWrapper...

... and Grabber too
This commit is contained in:
Paul Licameli
2019-12-07 21:00:39 -05:00
parent 53ee9c9800
commit 681950fc61
56 changed files with 204 additions and 140 deletions

View File

@@ -316,7 +316,7 @@ END_EVENT_TABLE()
//
ToolBar::ToolBar( AudacityProject &project,
int type,
const wxString &label,
const TranslatableString &label,
const wxString &section,
bool resizable )
: wxPanelWrapper()
@@ -349,16 +349,16 @@ ToolBar::~ToolBar()
//
// Returns the toolbar title
//
wxString ToolBar::GetTitle()
TranslatableString ToolBar::GetTitle()
{
/* i18n-hint: %s will be replaced by the name of the kind of toolbar.*/
return wxString::Format( _("Audacity %s Toolbar"), GetLabel() );
return XO("Audacity %s Toolbar").Format( GetLabel() );
}
//
// Returns the toolbar label
//
wxString ToolBar::GetLabel()
TranslatableString ToolBar::GetLabel()
{
return mLabel;
}
@@ -384,6 +384,15 @@ int ToolBar::GetType()
//
void ToolBar::SetLabel(const wxString & label)
{
// Probably shouldn't reach this overload, but perhaps virtual function
// dispatch will take us here from a pointer to the wxPanel base class
mLabel = TranslatableString{ label };
}
void ToolBar::SetLabel(const TranslatableString & label)
{
// Only this overload is publicly accessible when you have a pointer to
// Toolbar or a subclass of it
mLabel = label;
}