use (new) wxAcceleratorEntry::Create() instead of recently deprecated wxGetAccelFromString()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-09-04 23:56:56 +00:00
parent e81b607b43
commit 90527a50d7
13 changed files with 71 additions and 39 deletions

View File

@@ -920,7 +920,6 @@ void wxMenuItem::DoSetText( const wxString& str )
{
m_text.Empty();
m_text = GTKProcessMenuItemLabel(str, &m_hotKey);
// wxPrintf( wxT("DoSetText(): str %s m_text %s hotkey %s\n"), str.c_str(), m_text.c_str(), m_hotKey.c_str() );
}
#if wxUSE_ACCEL
@@ -930,14 +929,15 @@ wxAcceleratorEntry *wxMenuItem::GetAccel() const
if ( !GetHotKey() )
{
// nothing
return (wxAcceleratorEntry *)NULL;
return NULL;
}
// as wxGetAccelFromString() looks for TAB, insert a dummy one here
// accelerator parsing code looks for them after a TAB, so insert a dummy
// one here
wxString label;
label << wxT('\t') << GetHotKey();
return wxGetAccelFromString(label);
return wxAcceleratorEntry::Create(label);
}
#endif // wxUSE_ACCEL
@@ -1536,7 +1536,7 @@ static wxString GetGtkHotKey( const wxMenuItem& item )
hotkey += wxString::Format(wxT("Special%d"), code - WXK_SPECIAL1 + 1);
break;
*/
// if there are any other keys wxGetAccelFromString() may
// if there are any other keys wxAcceleratorEntry::Create() may
// return, we should process them here
default: