// append a new item or submenu to the menu
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
{
- wxASSERT_MSG( pItem != NULL, "can't append NULL item to the menu" );
+ wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
if ( pItem->IsSeparator() )
{
wxMenu *pSubMenu = pItem->GetSubMenu() ;
if ( pSubMenu != NULL )
{
- wxASSERT_MSG( pSubMenu->m_hMenu != NULL , "invalid submenu added");
+ wxASSERT_MSG( pSubMenu->m_hMenu != NULL , wxT("invalid submenu added"));
pSubMenu->m_menuParent = this ;
if (wxMenuBar::MacGetInstalledMenuBar() == m_menuBar)
{
if ( pos == (size_t)-1 )
{
- UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), "a" );
+ UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") );
pos = CountMenuItems(MAC_WXHMENU(m_hMenu)) ;
}
else
{
- UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), "a" , pos);
+ UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") , pos);
}
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
void wxMenu::MacBeforeDisplay( bool isSubMenu )
{
wxMenuItem* previousItem = NULL ;
- int pos ;
+ size_t pos ;
wxMenuItemList::Node *node;
wxMenuItem *item;
for (pos = 0, node = GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
if ( item->GetId() == wxApp::s_macPreferencesMenuItemId || item->GetId() == wxApp::s_macExitMenuItemId)
{
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos + 1, kMenuItemAttrHidden, 0 );
- if ( GetMenuItems().GetCount() == pos + 1 && previousItem != NULL && previousItem->IsSeparator() )
+ if ( GetMenuItems().GetCount() == pos + 1 &&
+ previousItem != NULL &&
+ previousItem->IsSeparator() )
{
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos , kMenuItemAttrHidden, 0 );
}
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
wxString message ;
- wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
+ wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource") );
::SetMenuBar( menubar ) ;
#if TARGET_API_MAC_CARBON
::DisposeMenuBar( menubar ) ;
#endif
for (size_t i = 0; i < m_menus.GetCount(); i++)
{
- Str255 label;
wxMenuItemList::Node *node;
wxMenuItem *item;
int pos ;
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
- if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
+ if( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
{
if ( mh == NULL )
{