- combo->m_alreadySent = TRUE;
-
- wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, combo->GetId());
- event.SetInt( combo->GetSelection() );
- wxString tmp( combo->GetStringSelection() );
- event.SetString( WXSTRINGCAST(tmp) );
- event.SetEventObject(combo);
- combo->GetEventHandler()->ProcessEvent(event);
+ int curSelection = combo->GetSelection();
+
+ if (combo->m_prevSelection == curSelection) return;
+
+ GtkWidget *list = GTK_COMBO(combo->m_widget)->list;
+ gtk_list_unselect_item( GTK_LIST(list), combo->m_prevSelection );
+
+ combo->m_prevSelection = curSelection;
+
+ wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
+ event.SetInt( curSelection );
+ event.SetString( combo->GetStringSelection() );
+ event.SetEventObject( combo );
+
+ combo->GetEventHandler()->ProcessEvent( event );
+}
+
+//-----------------------------------------------------------------------------
+// "changed" - typing and list item matches get changed, select-child
+// if it doesn't match an item then just get a single changed
+//-----------------------------------------------------------------------------
+
+static void
+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 );
+ combo->GetEventHandler()->ProcessEvent( event );
+}
+
+static void
+gtk_dummy_callback(GtkEntry *WXUNUSED(entry), GtkCombo *WXUNUSED(combo))
+{