1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-23 06:35:50 +01:00

ShuttleGui::StartNotebookPage takes TranslatableString...

... and remove an unused overload
This commit is contained in:
Paul Licameli
2019-12-26 14:08:52 -05:00
parent 744f4b626c
commit 8b65b1ae08
5 changed files with 11 additions and 31 deletions

View File

@@ -1047,18 +1047,20 @@ void ShuttleGuiBase::EndSimplebook()
}
wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
wxNotebookPage * ShuttleGuiBase::StartNotebookPage(
const TranslatableString & Name )
{
if( mShuttleMode != eIsCreating )
return NULL;
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
auto pNotebook = static_cast< wxBookCtrlBase* >( mpParent );
wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
pPage->SetName(Name);
const auto translated = Name.Translation();
pPage->SetName(translated);
pNotebook->AddPage(
pPage,
Name);
translated);
SetProportions( 1 );
mpParent = pPage;
@@ -1068,27 +1070,6 @@ wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
return pPage;
}
void ShuttleGuiBase::StartNotebookPage( const wxString & Name, wxNotebookPage * pPage )
{
if( mShuttleMode != eIsCreating )
return;
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
auto pNotebook = static_cast< wxBookCtrlBase* >( mpParent );
// wxNotebookPage * pPage = safenew wxPanelWrapper(GetParent());
pPage->Create( mpParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("panel"));
pPage->SetName(Name);
pNotebook->AddPage(
pPage,
Name);
SetProportions( 1 );
mpParent = pPage;
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
PushSizer();
// UpdateSizers();
}
void ShuttleGuiBase::EndNotebookPage()
{
if( mShuttleMode != eIsCreating )