X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..be98622c862fbb005a1d79ed87c53b675fb35676:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 26a50b4769..06922510a1 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: The wxWidgets licence +// Licence: The wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/defs.h" @@ -318,7 +318,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn glyph += 13 ; if ( !explicitCommandKey ) modifiers |= kMenuNoCommandModifier ; - } + } else { switch( key ) @@ -379,7 +379,14 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn macKey = kDownArrowCharCode ; glyph = kMenuDownArrowGlyph ; break ; + default : + macKey = toupper( key ) ; + break ; } + // we now allow non command key shortcuts + // remove in case this gives problems + if ( !explicitCommandKey ) + modifiers |= kMenuNoCommandModifier ; } // 1d and 1e have special meaning to SetItemCmd, so @@ -636,22 +643,6 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow, return err ; } -// events -void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) -{ - wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) inWindow) ) ; - RgnHandle updateRgn = NewRgn() ; - GetWindowUpdateRgn( inWindow , updateRgn ) ; - - Point zero = { 0 , 0 } ; - LocalToGlobal( &zero ) ; - OffsetRgn( updateRgn , -zero.h , -zero.v ) ; - - UpdateControls( inWindow , inRgn ) ; - InvalWindowRgn( inWindow, updateRgn) ; - DisposeRgn( updateRgn ) ; -} - bool UMAIsWindowFloating( WindowRef inWindow ) { WindowClass cl ;