X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24eef5846c1f8b5083010c2be15157f7079fb6e6..a068160f9f732794d7d373d3adb4979c97c2d663:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 2fd923f875..59de4dc29d 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "textctrl.h" -#endif - #include "wx/wxprec.h" #if wxUSE_TEXTCTRL @@ -45,6 +41,7 @@ #include "wx/utils.h" #include "wx/sysopt.h" #include "wx/menu.h" +#include "wx/intl.h" #if defined(__BORLANDC__) && !defined(__WIN32__) #include @@ -1388,6 +1385,11 @@ void wxMacUnicodeTextControl::GetSelection( long* from, long* to) const void wxMacUnicodeTextControl::SetSelection( long from , long to ) { ControlEditTextSelectionRec sel ; + if ((from == -1) && (to == -1)) + { + from = 0 ; + to = 32767 ; // sel has 16 bit signed values, max is 32767 + } sel.selStart = from ; sel.selEnd = to ; SetData( 0 , kControlEditTextSelectionTag, &sel ) ; @@ -2761,7 +2763,8 @@ wxMacMLTEHIViewControl::wxMacMLTEHIViewControl( wxTextCtrl *wxPeer, wxString st = str ; wxMacConvertNewlines10To13( &st ) ; - HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ; + HIRect hr = { { bounds.left , bounds.top} , + { bounds.right - bounds.left , bounds.bottom - bounds.top} } ; m_scrollView = NULL ; TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ;