]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
make string at least empty (instead of containing garbage) if malloc() failed
[wxWidgets.git] / src / common / menucmn.cpp
index 5e9ea0f289ebca4f233ed53186fcb20cf7cc297b..5422c06677e80909c61e6338fa9a50355e712a9f 100644 (file)
@@ -285,10 +285,6 @@ void wxMenuBase::Init(long style)
     m_style = style;
     m_clientData = (void *)NULL;
     m_eventHandler = this;
-
-#if wxUSE_MENU_CALLBACK
-    m_callback = (wxFunction) NULL;
-#endif // wxUSE_MENU_CALLBACK
 }
 
 wxMenuBase::~wxMenuBase()
@@ -557,7 +553,7 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source)
 
             if ( source->ProcessEvent(event) )
             {
-                // if anything changed, update the chanegd attribute
+                // if anything changed, update the changed attribute
                 if (event.GetSetText())
                     SetLabel(id, event.GetText());
                 if (event.GetSetChecked())
@@ -570,7 +566,7 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source)
             if ( item->GetSubMenu() )
                 item->GetSubMenu()->UpdateUI(source);
         }
-        //else: item is a separator (which don't process update UI events)
+        //else: item is a separator (which doesn't process update UI events)
 
         node = node->GetNext();
     }
@@ -584,15 +580,6 @@ bool wxMenuBase::SendEvent(int id, int checked)
 
     bool processed = FALSE;
 
-#if wxUSE_MENU_CALLBACK
-    // Try a callback
-    if (m_callback)
-    {
-        (void)(*(m_callback))(*this, event);
-        processed = TRUE;
-    }
-#endif // wxUSE_MENU_CALLBACK
-
     // Try the menu's event handler
     if ( !processed )
     {