X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/222ed1d678dff2f5c3c4164321dd05e8f47de487..ffafd8a55bb0b8fb4236e4522792a6b143813609:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 221de1a5b2..60dfd05bdb 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "menubase.h" #endif @@ -151,9 +151,9 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) } else { // is it a function key? - if ( current[0U] == 'f' && isdigit(current[1U]) && + if ( current[0U] == 'f' && wxIsdigit(current[1U]) && (current.Len() == 2 || - (current.Len() == 3 && isdigit(current[2U]))) ) { + (current.Len() == 3 && wxIsdigit(current[2U]))) ) { int n; wxSscanf(current.c_str() + 1, wxT("%d"), &n); @@ -166,6 +166,8 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) keyCode = WXK_DELETE; else if ( current == wxT("DELETE") ) keyCode = WXK_DELETE; + else if ( current == wxT("BACK") ) + keyCode = WXK_BACK; else if ( current == wxT("INS") ) keyCode = WXK_INSERT; else if ( current == wxT("INSERT") ) @@ -288,7 +290,7 @@ void wxMenuBase::Init(long style) wxMenuBase::~wxMenuBase() { WX_CLEAR_LIST(wxMenuItemList, m_items); - + // Actually, in GTK, the submenus have to get deleted first. } @@ -787,7 +789,6 @@ wxMenu *wxMenuBarBase::Remove(size_t pos) wxCHECK_MSG( node, NULL, wxT("bad index in wxMenuBar::Remove()") ); wxMenu *menu = node->GetData(); - wxCHECK( node, NULL ); // unexpected m_menus.Erase(node); menu->Detach();