X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e778ad8607ac24c10a854709114bd2c90765618c..63ff6f538e6b78af9cf619d624629524e3b0f21c:/src/mac/control.cpp?ds=inline diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 8f7542389a..b469c40ef4 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -207,7 +207,7 @@ void wxControl::SetLabel(const wxString& title) if ( m_macControl ) { - UMASetControlTitle( (ControlHandle) m_macControl , m_label ) ; + UMASetControlTitle( (ControlHandle) m_macControl , m_label , m_font.GetEncoding() ) ; } Refresh() ; } @@ -290,7 +290,8 @@ void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *contro void wxRemoveMacControlAssociation(wxControl *control) { - wxWinMacControlList->DeleteObject(control); + if ( wxWinMacControlList ) + wxWinMacControlList->DeleteObject(control); } void wxControl::MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString label , @@ -337,7 +338,7 @@ void wxControl::MacPostControlCreate() controlstyle.flags = kControlUseFontMask ; if (IsKindOf( CLASSINFO( wxButton ) ) ) - controlstyle.font = kControlFontSmallSystemFont ; // eventually kControlFontBigSystemFont ; + controlstyle.font = kControlFontBigSystemFont ; // eventually kControlFontBigSystemFont ; else controlstyle.font = kControlFontSmallSystemFont ; @@ -346,7 +347,7 @@ void wxControl::MacPostControlCreate() ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ; wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; ::EmbedControl( (ControlHandle) m_macControl , container ) ; - m_macControlIsShown = true ; + m_macControlIsShown = MacIsReallyShown() ; wxAssociateControlWithMacControl( (ControlHandle) m_macControl , this ) ; if ( wxMacSetupControlBackgroundUPP == NULL ) @@ -399,10 +400,11 @@ void wxControl::MacPostControlCreate() SetSize(pos.x, pos.y, new_size.x, new_size.y); #if wxUSE_UNICODE - UMASetControlTitle( (ControlHandle) m_macControl , wxStripMenuCodes(m_label) ) ; + UMASetControlTitle( (ControlHandle) m_macControl , wxStripMenuCodes(m_label) , m_font.GetEncoding() ) ; #endif - UMAShowControl( (ControlHandle) m_macControl ) ; + if ( m_macControlIsShown ) + UMAShowControl( (ControlHandle) m_macControl ) ; SetCursor( *wxSTANDARD_CURSOR ) ;