[m_cocoaNSMenu release];
}
-bool wxMenu::DoAppend(wxMenuItem *item)
+wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
{
wxAutoNSAutoreleasePool pool;
if(!wxMenuBase::DoAppend(item))
- return false;
+ return NULL;
[m_cocoaNSMenu addItem: item->GetNSMenuItem()];
- return true;
+ return item;
}
-bool wxMenu::DoInsert(unsigned long pos, wxMenuItem *item)
+wxMenuItem* wxMenu::DoInsert(unsigned long pos, wxMenuItem *item)
{
wxAutoNSAutoreleasePool pool;
if(!wxMenuBase::DoInsert(pos,item))
- return false;
+ return NULL;
[m_cocoaNSMenu insertItem:item->GetNSMenuItem() atIndex:pos];
- return true;
+ return item;
}
wxMenuItem* wxMenu::DoRemove(wxMenuItem *item)
bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
{
wxAutoNSAutoreleasePool pool;
- wxLogDebug(wxT("append menu=%p, title=%s"),menu,title.c_str());
+ wxLogTrace(wxTRACE_COCOA,wxT("append menu=%p, title=%s"),menu,title.c_str());
if(!wxMenuBarBase::Append(menu,title))
return false;
wxASSERT(menu);
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
wxAutoNSAutoreleasePool pool;
- wxLogDebug(wxT("insert pos=%lu, menu=%p, title=%s"),pos,menu,title.c_str());
+ wxLogTrace(wxTRACE_COCOA,wxT("insert pos=%lu, menu=%p, title=%s"),pos,menu,title.c_str());
// Get the current menu at this position
wxMenu *nextmenu = GetMenu(pos);
if(!wxMenuBarBase::Insert(pos,menu,title))