]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
Allow wx parents a chance to handle events fired by non-wx children. (i.e. wxActiveX...
[wxWidgets.git] / src / gtk / combobox.cpp
index 3480b849047306342f16d50c08b2a0effd9ee911..6c967b58beb49939b621618ddb10ae51b724bf01 100644 (file)
@@ -83,6 +83,12 @@ gtk_popup_hide_callback(GtkCombo *WXUNUSED(gtk_combo), wxComboBox *combo)
         event.SetString( combo->GetStringSelection() );
         event.SetEventObject( combo );
         combo->GetEventHandler()->ProcessEvent( event );
+
+        // for consistency with the other ports, send TEXT event
+        wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
+        event2.SetString( combo->GetStringSelection() );
+        event2.SetEventObject( combo );
+        combo->GetEventHandler()->ProcessEvent( event2 );
     }
 
     // reset the selection flag to value meaning that it is hidden
@@ -144,7 +150,7 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi
         event.SetEventObject( combo );
         combo->GetEventHandler()->ProcessEvent( event );
 
-        // for consistencu with the other ports, don't generate text update
+        // 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() );
@@ -217,7 +223,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
 
     // Disable GTK's broken events ...
     gtk_signal_disconnect( GTK_OBJECT(combo->entry), combo->entry_change_id );
-    // ... and add surogate handler.
+    // ... and add surrogate handler.
     combo->entry_change_id = gtk_signal_connect (GTK_OBJECT (combo->entry), "changed",
                   (GtkSignalFunc) gtk_dummy_callback, combo);