1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-16 16:20:50 +02:00

Bug1119 residuals... (#496)

... Fix assertion violations when language isn't English
This commit is contained in:
Paul Licameli 2020-04-21 14:21:05 -04:00 committed by GitHub
parent 018a8681ef
commit eb92fc07bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,8 @@ void DoMacMinimize(AudacityProject *project)
} }
} }
const auto menuTitle = XO("&Window");
} }
/// Namespace for functions for window management (mac only?) /// Namespace for functions for window management (mac only?)
@ -84,7 +86,7 @@ void Refresh()
} }
// Should always find the Window menu // Should always find the Window menu
int pos = bar->FindMenu(wxT("Window")); int pos = bar->FindMenu( menuTitle.Translation() );
wxASSERT(pos != wxNOT_FOUND); wxASSERT(pos != wxNOT_FOUND);
if (pos == wxNOT_FOUND) if (pos == wxNOT_FOUND)
{ {
@ -192,7 +194,7 @@ BaseItemSharedPtr WindowMenu()
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Window"), XO("&Window"), Menu( wxT("Window"), menuTitle,
Section( "", Section( "",
/* i18n-hint: Standard Macintosh Window menu item: Make (the current /* i18n-hint: Standard Macintosh Window menu item: Make (the current
* window) shrink to an icon on the dock */ * window) shrink to an icon on the dock */