Create real separator items instead of items without titles

(NOTE: Use diff -w to see what this really changes)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2004-03-26 20:37:27 +00:00
parent 461bdfcc1d
commit 67352554ff

View File

@@ -135,6 +135,10 @@ wxMenuItemCocoa::wxMenuItemCocoa(wxMenu *pParentMenu,
: wxMenuItemBase(pParentMenu, itemid, strName, strHelp, kind, pSubMenu)
{
wxAutoNSAutoreleasePool pool;
if(m_kind == wxITEM_SEPARATOR)
m_cocoaNSMenuItem = [[NSMenuItem separatorItem] retain];
else
{
NSString *menuTitle = wxInitNSStringWithWxString([NSString alloc],wxStripMenuCodes(strName));
m_cocoaNSMenuItem = [[NSMenuItem alloc] initWithTitle:menuTitle action:@selector(wxMenuItemAction:) keyEquivalent:@""];
sm_cocoaHash.insert(wxMenuItemCocoaHash::value_type(m_cocoaNSMenuItem,this));
@@ -147,6 +151,7 @@ wxMenuItemCocoa::wxMenuItemCocoa(wxMenu *pParentMenu,
}
[menuTitle release];
}
}
wxMenuItem::~wxMenuItem()
{