1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

Reviewed allocations of wxMenuBar items.

This commit is contained in:
Paul Licameli
2016-02-20 20:23:54 -05:00
parent af16636fe2
commit cf3daebff6
5 changed files with 561 additions and 550 deletions

View File

@@ -1406,10 +1406,14 @@ bool AudacityApp::OnInit()
fileMenu->Append(wxID_ABOUT, _("&About Audacity..."));
fileMenu->Append(wxID_PREFERENCES, wxString(_("&Preferences...")) + wxT("\tCtrl+,"));
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(fileMenu, _("&File"));
{
auto menuBar = std::make_unique<wxMenuBar>();
menuBar->Append(fileMenu, _("&File"));
wxMenuBar::MacSetCommonMenuBar(menuBar);
// PRL: Are we sure wxWindows will not leak this menuBar?
// The online documentation is not explicit.
wxMenuBar::MacSetCommonMenuBar(menuBar.release());
}
mRecentFiles->UseMenu(recentMenu);
mRecentFiles->AddFilesToMenu(recentMenu);