]> git.saurik.com Git - wxWidgets.git/commitdiff
combobox buglet when inserting item
authorRobert Roebling <robert@roebling.de>
Mon, 26 Apr 1999 22:17:55 +0000 (22:17 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 26 Apr 1999 22:17:55 +0000 (22:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/combobox.cpp
src/gtk1/combobox.cpp

index c202ba56eb55a9106525d6f20c56e27fb4e59caf..63162e8ed0f6cc2ab545790dde7d4846c7d8c406 100644 (file)
@@ -49,6 +49,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
     event.SetInt( combo->GetSelection() );
     event.SetString( combo->GetStringSelection() );
     event.SetEventObject( combo );
+    
     combo->GetEventHandler()->ProcessEvent( event );
 }
 
@@ -164,11 +165,11 @@ void wxComboBox::AppendCommon( const wxString &item )
 
     GtkWidget *list_item = gtk_list_item_new_with_label( item.mbc_str() );
 
+    gtk_container_add( GTK_CONTAINER(list), list_item );
+
     gtk_signal_connect( GTK_OBJECT(list_item), "select",
       GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
 
-    gtk_container_add( GTK_CONTAINER(list), list_item );
-
     if (GTK_WIDGET_REALIZED(m_widget))
     {
         gtk_widget_realize( list_item );
index c202ba56eb55a9106525d6f20c56e27fb4e59caf..63162e8ed0f6cc2ab545790dde7d4846c7d8c406 100644 (file)
@@ -49,6 +49,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
     event.SetInt( combo->GetSelection() );
     event.SetString( combo->GetStringSelection() );
     event.SetEventObject( combo );
+    
     combo->GetEventHandler()->ProcessEvent( event );
 }
 
@@ -164,11 +165,11 @@ void wxComboBox::AppendCommon( const wxString &item )
 
     GtkWidget *list_item = gtk_list_item_new_with_label( item.mbc_str() );
 
+    gtk_container_add( GTK_CONTAINER(list), list_item );
+
     gtk_signal_connect( GTK_OBJECT(list_item), "select",
       GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
 
-    gtk_container_add( GTK_CONTAINER(list), list_item );
-
     if (GTK_WIDGET_REALIZED(m_widget))
     {
         gtk_widget_realize( list_item );