X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f7bdcdd70dc6e74e35185559e1c2ff2cac3e9e6e..eda61172d06869da6cb1cfc9700cd44962078e5c:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 46b158cce4..d8f8db5bdd 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -184,9 +184,11 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title ) { m_menus.Append( menu ); + const wxChar *pc; + /* GTK 1.2 wants to have "_" instead of "&" for accelerators */ wxString str; - for ( const wxChar *pc = title; *pc != _T('\0'); pc++ ) + for ( pc = title; *pc != _T('\0'); pc++ ) { if (*pc == _T('&')) { @@ -230,7 +232,7 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title ) /* in order to get the pointer to the item we need the item text _without_ underscores */ wxString tmp = _T("
/"); - for ( const wxChar *pc = str; *pc != _T('\0'); pc++ ) + for ( pc = str; *pc != _T('\0'); pc++ ) { if (*pc == _T('_')) pc++; /* skip it */ tmp << *pc;