From 345bdf13c073dde5f81ff8b91640232dd09445ee Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Mon, 10 Oct 2005 19:10:29 +0000 Subject: [PATCH] For consistency with other ports, send TEXT event after SELECTED event git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/combobox.cpp | 8 +++++++- src/gtk1/combobox.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 3480b84904..9e6870a9d0 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -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() ); diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 3480b84904..9e6870a9d0 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -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() ); -- 2.45.2