more changes to make wx compile without implicit wxString->char* conversion (for STL build)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-06-20 07:44:45 +00:00
parent d38f70b249
commit e0a050e347
55 changed files with 183 additions and 169 deletions

View File

@@ -868,18 +868,22 @@ wxString wxMenuItem::GTKProcessMenuItemLabel(const wxString& str, wxString *hotK
wxString text;
// '\t' is the deliminator indicating a hot key
const wxChar *pc = str;
while ( (*pc != wxT('\0')) && (*pc != wxT('\t')) )
wxString::const_iterator pc = str.begin();
while ( pc != str.end() && *pc != wxT('\t') )
{
if ((*pc == wxT('&')) && (*(pc+1) == wxT('&')))
if (*pc == wxT('&'))
{
// "&" is doubled to indicate "&" instead of accelerator
++pc;
text << wxT('&');
}
else if (*pc == wxT('&'))
{
text << wxT('_');
wxString::const_iterator next = pc + 1;
if (next != str.end() && *next == wxT('&'))
{
// "&" is doubled to indicate "&" instead of accelerator
++pc;
text << wxT('&');
}
else
{
text << wxT('_');
}
}
else if ( *pc == wxT('_') ) // escape underscores
{
@@ -898,7 +902,7 @@ wxString wxMenuItem::GTKProcessMenuItemLabel(const wxString& str, wxString *hotK
if(*pc == wxT('\t'))
{
pc++;
*hotKey = pc;
hotKey->assign(pc, str.end());
}
}