X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8e24dfa9322702d56a125586a7d4a37f4a5dfd7..c3eeb758b7790948751f547fd5ef803a75b803a4:/src/gtk1/combobox.cpp diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index f295daac11..e619060405 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -19,6 +19,7 @@ #if wxUSE_COMBOBOX #include "wx/settings.h" +#include "wx/arrstr.h" #include "wx/intl.h" #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED @@ -102,6 +103,19 @@ BEGIN_EVENT_TABLE(wxComboBox, wxControl) EVT_CHAR(wxComboBox::OnChar) END_EVENT_TABLE() +bool wxComboBox::Create( wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + long style, const wxValidator& validator, + const wxString& name ) +{ + wxCArrayString chs(choices); + + return Create( parent, id, value, pos, size, chs.GetCount(), + chs.GetStrings(), style, validator, name ); +} + bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], @@ -327,8 +341,7 @@ void wxComboBox::DoSetItemClientObject( int n, wxClientData* clientData ) wxList::compatibility_iterator node = m_clientObjectList.Item( n ); if (!node) return; - wxClientData *cd = (wxClientData*) node->GetData(); - if (cd) delete cd; + // wxItemContainer already deletes data for us node->SetData( (wxObject*) clientData ); }