]> git.saurik.com Git - wxWidgets.git/commitdiff
wxListBox now sends events using AddPendingEvent(),
authorRobert Roebling <robert@roebling.de>
Sat, 6 Nov 1999 16:47:38 +0000 (16:47 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 6 Nov 1999 16:47:38 +0000 (16:47 +0000)
    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
src/gtk1/listbox.cpp

index bdf69d7e36429b785ae663d6f670022f4b8ce4fa..1452563f5032fce32ef51300a33e3ca5c66d8a44 100644 (file)
@@ -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 );
index bdf69d7e36429b785ae663d6f670022f4b8ce4fa..1452563f5032fce32ef51300a33e3ca5c66d8a44 100644 (file)
@@ -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 );