X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de1b0aeb6ca71f915479d07e040b1d65e5096951..a4f4d548ce0d3533fe9e84d812643cc7c21dd580:/src/mac/carbon/listbox.cpp diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 4734a0b07e..c0084b4a6e 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp +// Name: src/mac/carbon/listbox.cpp // Purpose: wxListBox // Author: Stefan Csomor // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "listbox.h" -#endif - #include "wx/wxprec.h" #if wxUSE_LISTBOX @@ -384,9 +380,8 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData) } } -int wxListBox::FindString(const wxString& s) const +int wxListBox::FindString(const wxString& s, bool bCase) const { - if ( s.Right(1) == wxT("*") ) { wxString search = s.Left( s.Length() - 1 ) ; @@ -398,7 +393,7 @@ int wxListBox::FindString(const wxString& s) const { wxMacStringToPascal( m_stringArray[i].Left( len ) , s1 ) ; - if ( EqualString( s1 , s2 , false , false ) ) + if ( EqualString( s1 , s2 , bCase , false ) ) return i ; } if ( s.Left(1) == wxT("*") && s.Length() > 1 ) @@ -423,11 +418,11 @@ int wxListBox::FindString(const wxString& s) const { wxMacStringToPascal( m_stringArray[i] , s1 ) ; - if ( EqualString( s1 , s2 , false , false ) ) + if ( EqualString( s1 , s2 , bCase , false ) ) return i ; } } - return -1; + return wxNOT_FOUND; } void wxListBox::Clear() @@ -876,4 +871,3 @@ void wxListBox::OnChar(wxKeyEvent& event) #endif // !TARGET_API_MAC_OSX #endif -