Applied #10356: Duplicate help menu in wxMac as a plugin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -475,7 +475,7 @@ wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
|
|||||||
// make sure it is one of our own menus, or of the 'synthetic' apple and help menus , otherwise don't touch
|
// make sure it is one of our own menus, or of the 'synthetic' apple and help menus , otherwise don't touch
|
||||||
MenuItemIndex firstUserHelpMenuItem ;
|
MenuItemIndex firstUserHelpMenuItem ;
|
||||||
static MenuHandle mh = NULL ;
|
static MenuHandle mh = NULL ;
|
||||||
if ( mh == NULL )
|
if ( mh == NULL && wxMenuBar::MacGetInstalledMenuBar() != NULL )
|
||||||
{
|
{
|
||||||
if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) != noErr )
|
if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) != noErr )
|
||||||
mh = NULL ;
|
mh = NULL ;
|
||||||
@@ -835,8 +835,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
event_posted_context.perform = macPostedEventCallback;
|
event_posted_context.perform = macPostedEventCallback;
|
||||||
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
|
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
|
||||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
||||||
// run loop takes ownership
|
// run loop takes ownership
|
||||||
CFRelease(m_macEventPosted);
|
CFRelease(m_macEventPosted);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UMAShowArrowCursor() ;
|
UMAShowArrowCursor() ;
|
||||||
@@ -898,10 +898,10 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
#ifdef __WXMAC_OSX__
|
#ifdef __WXMAC_OSX__
|
||||||
if (m_macEventPosted)
|
if (m_macEventPosted)
|
||||||
{
|
{
|
||||||
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
||||||
m_macEventPosted = NULL;
|
m_macEventPosted = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// One last chance for pending objects to be cleaned up
|
// One last chance for pending objects to be cleaned up
|
||||||
@@ -1625,7 +1625,7 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
|
|||||||
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
|
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
|
||||||
// and look at the character after
|
// and look at the character after
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
// TODO new implementation using TextInputSources
|
// TODO new implementation using TextInputSources
|
||||||
#else
|
#else
|
||||||
UInt32 state = 0;
|
UInt32 state = 0;
|
||||||
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);
|
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);
|
||||||
|
Reference in New Issue
Block a user