diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index f5662e116a..6907fe1d68 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -500,8 +500,11 @@ void wxMenuItem::SetName( const wxString& str ) /* only GTK 1.2 know about hot keys */ m_hotKey = _T(""); #if (GTK_MINOR_VERSION > 0) - pc++; - m_hotKey = pc; + if(*pc == _T('\t')) + { + pc++; + m_hotKey = pc; + } #endif if (m_menuItem) diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index f5662e116a..6907fe1d68 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -500,8 +500,11 @@ void wxMenuItem::SetName( const wxString& str ) /* only GTK 1.2 know about hot keys */ m_hotKey = _T(""); #if (GTK_MINOR_VERSION > 0) - pc++; - m_hotKey = pc; + if(*pc == _T('\t')) + { + pc++; + m_hotKey = pc; + } #endif if (m_menuItem)