X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdd3ed7a8f5e43d44fffef5c7f857f6256dcc67a..32d4bfd16c554ba060ccee9236abb8e7ff0e913a:/src/gtk/combobox.cpp diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 349ee758d2..efbe51763d 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(); @@ -134,9 +141,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, gtk_widget_show( list_item ); } - m_parent->AddChild( this ); - - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -582,7 +587,7 @@ void wxComboBox::OnChar( wxKeyEvent &event ) void wxComboBox::OnSize( wxSizeEvent &event ) { - wxControl::OnSize( event ); + event.Skip(); return; @@ -625,3 +630,4 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window ) (window == GTK_COMBO(m_widget)->button->window ) ); } +#endif