From 4349acd401ac74db826e046582c995e5b7052916 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 6 Nov 1999 16:47:38 +0000 Subject: [PATCH] wxListBox now sends events using AddPendingEvent(), I wonder if that really is good. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/listbox.cpp | 7 ++++--- src/gtk1/listbox.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index bdf69d7e36..1452563f50 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -253,7 +253,8 @@ static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox event.m_commandInt = n; - listbox->GetEventHandler()->ProcessEvent( event ); + listbox->GetEventHandler()->AddPendingEvent( event ); +// listbox->GetEventHandler()->ProcessEvent( event ); } //----------------------------------------------------------------------------- @@ -483,10 +484,10 @@ void wxListBox::GtkAddItem( const wxString &item, int pos ) (GtkSignalFunc)gtk_listbox_key_press_callback, (gpointer)this ); - gtk_widget_show( list_item ); - ConnectWidget( list_item ); + gtk_widget_show( list_item ); + if (GTK_WIDGET_REALIZED(m_widget)) { gtk_widget_realize( list_item ); diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index bdf69d7e36..1452563f50 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -253,7 +253,8 @@ static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox event.m_commandInt = n; - listbox->GetEventHandler()->ProcessEvent( event ); + listbox->GetEventHandler()->AddPendingEvent( event ); +// listbox->GetEventHandler()->ProcessEvent( event ); } //----------------------------------------------------------------------------- @@ -483,10 +484,10 @@ void wxListBox::GtkAddItem( const wxString &item, int pos ) (GtkSignalFunc)gtk_listbox_key_press_callback, (gpointer)this ); - gtk_widget_show( list_item ); - ConnectWidget( list_item ); + gtk_widget_show( list_item ); + if (GTK_WIDGET_REALIZED(m_widget)) { gtk_widget_realize( list_item ); -- 2.45.2