X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9da00e91b4ad147584297b1a64cc1abfa50ee010..9802983f157c32177e92e8c0f6b1ce44aec0ebca:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index e38374b2cc..110daa1c21 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -9,10 +9,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "combobox.h" #endif +#include "wx/wxprec.h" + +#if wxUSE_COMBOBOX + #include "wx/combobox.h" #include "wx/button.h" #include "wx/menu.h" @@ -357,7 +361,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, } SetBestSize(size); // Needed because it is a wxControlWithItems - + SetStringSelection(value); + return true; } @@ -563,18 +568,6 @@ wxString wxComboBox::GetStringSelection() const return wxEmptyString; } -bool wxComboBox::SetStringSelection(const wxString& sel) -{ - int s = FindString (sel); - if (s > -1) - { - SetSelection (s); - return true; - } - else - return false; -} - void wxComboBox::SetString(int n, const wxString& s) { m_choice->SetString( n , s ) ; @@ -654,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR return noErr ; } +#endif