X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e208b369f0b11a704248fbc1c8483cbc85f60fd1..bb69661b050ad2c774985e225cce0e497a875143:/src/gtk1/combobox.cpp diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 91ed541378..efbe51763d 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/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,15 +587,15 @@ void wxComboBox::OnChar( wxKeyEvent &event ) void wxComboBox::OnSize( wxSizeEvent &event ) { - wxControl::OnSize( event ); + event.Skip(); + + return; -/* int w = 21; gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height ); gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y ); gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height ); -*/ } void wxComboBox::ApplyWidgetStyle() @@ -625,3 +630,4 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window ) (window == GTK_COMBO(m_widget)->button->window ) ); } +#endif