X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..20a8b34e2c6d43140cb8b38482536a49ed7e0e7a:/src/gtk/combobox.cpp diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index caf222a719..b51c7c04ab 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -12,6 +12,9 @@ #endif #include "wx/combobox.h" + +#if wxUSE_COMBOBOX + #include "wx/settings.h" #include @@ -41,7 +44,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { if (g_isIdle) wxapp_install_idle_handler(); - if (!combo->HasVMT()) return; + if (!combo->m_hasVMT) return; if (g_blockEventsOnDrag) return; @@ -70,6 +73,8 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { if (g_isIdle) wxapp_install_idle_handler(); + if (!combo->m_hasVMT) return; + wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); event.SetString( combo->GetValue() ); event.SetEventObject( combo ); @@ -99,7 +104,9 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, PreCreation( parent, id, pos, size, style, name ); +#if wxUSE_VALIDATORS SetValidator( validator ); +#endif m_widget = gtk_combo_new(); @@ -159,13 +166,15 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, wxComboBox::~wxComboBox() { - wxNode *node = m_clientDataList.First(); + wxNode *node = m_clientObjectList.First(); while (node) { wxClientData *cd = (wxClientData*)node->Data(); if (cd) delete cd; node = node->Next(); } + m_clientObjectList.Clear(); + m_clientDataList.Clear(); } @@ -623,3 +632,4 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window ) (window == GTK_COMBO(m_widget)->button->window ) ); } +#endif