X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff8bfdbbb14af4cd77de9d3534b1cd4f7a033137..3f263f4542f0288a9aa2228f27f43e12a888e5a4:/src/gtk1/listbox.cpp diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 9571b5e29b..5028599776 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -17,7 +17,10 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/checklst.h" + +#if wxUSE_TOOLTIPS #include "wx/tooltip.h" +#endif #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" @@ -313,6 +316,8 @@ void wxListBox::AppendCommon( const wxString &item ) list_item = gtk_list_item_new_with_label( item ); } + gtk_container_add( GTK_CONTAINER(m_list), list_item ); + gtk_signal_connect( GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); @@ -320,8 +325,6 @@ void wxListBox::AppendCommon( const wxString &item ) gtk_signal_connect( GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - gtk_container_add( GTK_CONTAINER(m_list), list_item ); - if (m_widgetStyle) ApplyWidgetStyle(); gtk_signal_connect( GTK_OBJECT(list_item), @@ -347,7 +350,9 @@ void wxListBox::AppendCommon( const wxString &item ) #endif #endif +#if wxUSE_TOOLTIPS if (m_toolTip) m_toolTip->Apply( this ); +#endif } void wxListBox::Append( const wxString &item )