support for standard command IDs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -198,8 +198,8 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
|
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
|
||||||
pos += 1 ;
|
pos += 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
|
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ;
|
||||||
SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
|
SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
|
||||||
pItem->UpdateItemText() ;
|
pItem->UpdateItemText() ;
|
||||||
pItem->UpdateItemBitmap() ;
|
pItem->UpdateItemBitmap() ;
|
||||||
@@ -713,7 +713,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
if ( mh )
|
if ( mh )
|
||||||
{
|
{
|
||||||
UMAAppendMenuItem(mh, item->GetText() , wxFont::GetDefaultEncoding(), entry);
|
UMAAppendMenuItem(mh, item->GetText() , wxFont::GetDefaultEncoding(), entry);
|
||||||
SetMenuItemCommandID( mh , CountMenuItems(mh) , item->GetId() ) ;
|
SetMenuItemCommandID( mh , CountMenuItems(mh) , wxIdToMacCommand ( item->GetId() ) ) ;
|
||||||
SetMenuItemRefCon( mh , CountMenuItems(mh) , (UInt32)item ) ;
|
SetMenuItemRefCon( mh , CountMenuItems(mh) , (UInt32)item ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -739,7 +739,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
wxAcceleratorEntry* entry = wxGetAccelFromString( aboutMenuItem->GetText() ) ;
|
wxAcceleratorEntry* entry = wxGetAccelFromString( aboutMenuItem->GetText() ) ;
|
||||||
UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , aboutMenuItem->GetText() , wxFont::GetDefaultEncoding() );
|
UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , aboutMenuItem->GetText() , wxFont::GetDefaultEncoding() );
|
||||||
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
|
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
|
||||||
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , aboutMenuItem->GetId() ) ;
|
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
|
||||||
SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (UInt32)aboutMenuItem ) ;
|
SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (UInt32)aboutMenuItem ) ;
|
||||||
UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ;
|
UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user