- // Now send the event ourselves
- wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
- event2.SetString( combo->GetValue() );
- event2.SetEventObject( combo );
- combo->GetEventHandler()->ProcessEvent( event2 );
+ // for consistency with the other ports, don't generate text update
+ // events while the user is browsing the combobox neither
+ wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
+ event2.SetString( combo->GetValue() );
+ event2.SetEventObject( combo );
+ combo->GetEventHandler()->ProcessEvent( event2 );
+ }
+}
+}
+
+#ifdef __WXGTK24__
+extern "C" {
+static void
+gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
+{
+ if (!combo->m_hasVMT) return;
+
+ wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
+ event.SetString( combo->GetValue() );
+ event.SetEventObject( combo );
+ combo->GetEventHandler()->ProcessEvent( event );
+}
+}
+
+extern "C" {
+static void
+gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
+{
+ if (!combo->m_hasVMT) return;
+
+ if (combo->GetSelection() == -1)
+ return;
+
+ wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
+ event.SetInt( combo->GetSelection() );
+ event.SetString( combo->GetStringSelection() );
+ event.SetEventObject( combo );
+ combo->GetEventHandler()->ProcessEvent( event );