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:
@@ -865,8 +865,6 @@ void wxMenuItem::DoSetText( const wxString& str )
|
||||
pc++;
|
||||
m_hotKey = pc;
|
||||
}
|
||||
|
||||
// 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
|
||||
@@ -879,11 +877,12 @@ wxAcceleratorEntry *wxMenuItem::GetAccel() const
|
||||
return (wxAcceleratorEntry *)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
|
||||
@@ -1423,7 +1422,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:
|
||||
|
Reference in New Issue
Block a user