underscores in menu items handled too under GTK+ 1.2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-09-18 17:54:14 +00:00
parent a4c970041c
commit 572d746108
2 changed files with 14 additions and 6 deletions

View File

@@ -594,8 +594,12 @@ void wxMenuItem::SetName( const wxString& str )
{
#if (GTK_MINOR_VERSION > 0)
m_text << _T('_');
} else
if (*pc == _T('/')) /* we have to filter out slashes ... */
}
else if ( *pc == _T('_') ) // escape underscores
{
m_text << _T("__");
}
else if (*pc == _T('/')) /* we have to filter out slashes ... */
{
m_text << _T('\\'); /* ... and replace them with back slashes */
#endif
@@ -829,7 +833,7 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
wxString s = _T("<main>/");
for ( const wxChar *pc = text; *pc != _T('\0'); pc++ )
{
if (*pc == _T('_')) pc++; /* skip it */
while (*pc == _T('_')) pc++; /* skip it */
s << *pc;
}