1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-30 23:23:44 +02: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

@ -411,7 +411,7 @@ visit our [[https://forum.audacityteam.org/|forum]].");
wxT("</center>")
);
auto pPage = S.StartNotebookPage( _("Audacity") );
auto pPage = S.StartNotebookPage( XO("Audacity") );
S.StartVerticalLay(1);
{
//v For now, change to AudacityLogoWithName via old-fashioned way, not Theme.
@ -464,7 +464,7 @@ visit our [[https://forum.audacityteam.org/|forum]].");
void AboutDialog::PopulateInformationPage( ShuttleGui & S )
{
wxString informationStr; // string to build up list of information in
S.StartNotebookPage( _("Build Information") ); // start the tab
S.StartNotebookPage( XO("Build Information") ); // start the tab
S.StartVerticalLay(2); // create the window
HtmlWindow *html = safenew LinkingHtmlWindow(S.GetParent(), -1, wxDefaultPosition,
wxSize(ABOUT_DIALOG_WIDTH, 264),
@ -718,7 +718,7 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
void AboutDialog::PopulateLicensePage( ShuttleGui & S )
{
S.StartNotebookPage( _("GPL License") );
S.StartNotebookPage( XO("GPL License") );
S.StartVerticalLay(1);
HtmlWindow *html = safenew LinkingHtmlWindow(S.GetParent(), -1,
wxDefaultPosition,

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 )

View File

@ -380,8 +380,7 @@ public:
// Use within any kind of book control:
// IDs of notebook pages cannot be chosen by the caller
wxNotebookPage * StartNotebookPage( const wxString & Name );
void StartNotebookPage( const wxString & Name, wxNotebookPage * pPage );
wxNotebookPage * StartNotebookPage( const TranslatableString & Name );
void EndNotebookPage();

View File

@ -998,7 +998,7 @@ void Exporter::CreateUserPane(wxWindow *parent)
for (int j = 0; j < pPlugin->GetFormatCount(); j++)
{
// Name of simple book page is not displayed
S.StartNotebookPage( wxEmptyString );
S.StartNotebookPage( {} );
pPlugin->OptionsCreate(S, j);
S.EndNotebookPage();
}

View File

@ -309,7 +309,7 @@ void ExportMultipleDialog::PopulateOrExchange(ShuttleGui& S)
for (int j = 0; j < pPlugin->GetFormatCount(); j++)
{
// Name of simple book page is not displayed
S.StartNotebookPage( wxEmptyString );
S.StartNotebookPage( {} );
pPlugin->OptionsCreate(S, j);
S.EndNotebookPage();
}