Applied part of #9142 (wxMac: Fixes missing translation of "Window" menu name)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -780,6 +780,11 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
EnableMenuCommand( NULL , kHICommandQuit ) ;
|
EnableMenuCommand( NULL , kHICommandQuit ) ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
wxString strippedHelpMenuTitle = wxStripMenuCodes( wxApp::s_macHelpMenuTitleName ) ;
|
||||||
|
wxString strippedTranslatedHelpMenuTitle = wxStripMenuCodes( wxString( _("&Help") ) ) ;
|
||||||
|
|
||||||
|
wxString strippedWindowMenuTitle = wxStripMenuCodes( wxT("&Window") /* wxApp::s_macWindowMenuTitleName */ ) ;
|
||||||
|
wxString strippedTranslatedWindowMenuTitle = wxStripMenuCodes( wxString( _("&Window") ) ) ;
|
||||||
|
|
||||||
wxMenuList::compatibility_iterator menuIter = m_menus.GetFirst();
|
wxMenuList::compatibility_iterator menuIter = m_menus.GetFirst();
|
||||||
for (size_t i = 0; i < m_menus.GetCount(); i++, menuIter = menuIter->GetNext())
|
for (size_t i = 0; i < m_menus.GetCount(); i++, menuIter = menuIter->GetNext())
|
||||||
@@ -787,8 +792,9 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
wxMenuItemList::compatibility_iterator node;
|
wxMenuItemList::compatibility_iterator node;
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
wxMenu* menu = menuIter->GetData() , *subMenu = NULL ;
|
wxMenu* menu = menuIter->GetData() , *subMenu = NULL ;
|
||||||
|
wxString strippedMenuTitle = wxStripMenuCodes(m_titles[i]);
|
||||||
|
|
||||||
if ( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
if ( strippedMenuTitle == wxT("?") || strippedMenuTitle == strippedHelpMenuTitle || strippedMenuTitle == strippedTranslatedHelpMenuTitle )
|
||||||
{
|
{
|
||||||
for (node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext())
|
for (node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext())
|
||||||
{
|
{
|
||||||
@@ -847,8 +853,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( (strippedMenuTitle == wxT("Window") || strippedMenuTitle == strippedWindowMenuTitle || strippedMenuTitle == strippedTranslatedWindowMenuTitle )
|
||||||
else if ( ( m_titles[i] == wxT("Window") || m_titles[i] == wxT("&Window") )
|
|
||||||
&& GetAutoWindowMenu() )
|
&& GetAutoWindowMenu() )
|
||||||
{
|
{
|
||||||
if ( MacGetWindowMenuHMenu() == NULL )
|
if ( MacGetWindowMenuHMenu() == NULL )
|
||||||
|
Reference in New Issue
Block a user