-#if wxUSE_DRAG_AND_DROP
-void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
-{
- wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
-
-#ifndef NEW_GTK_DND_CODE
- if (m_dropTarget)
- {
- GList *child = m_list->children;
- while (child)
- {
- m_dropTarget->UnregisterWidget( GTK_WIDGET( child->data ) );
- child = child->next;
- }
- }
-#endif
-
- wxWindow::SetDropTarget( dropTarget );
-
-#ifndef NEW_GTK_DND_CODE
- if (m_dropTarget)
- {
- GList *child = m_list->children;
- while (child)
- {
- m_dropTarget->RegisterWidget( GTK_WIDGET( child->data ) );
- child = child->next;
- }
- }
-#endif
-}
-#endif
-
-void wxListBox::DisableEvents()
-{
- GList *child = m_list->children;
- while (child)
- {
- gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
- GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
-
- if (HasFlag(wxLB_MULTIPLE))
- gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
- GTK_SIGNAL_FUNC(gtk_listitem_deselect_callback), (gpointer)this );
-
- child = child->next;
- }
-}
-
-void wxListBox::EnableEvents()
-{
- GList *child = m_list->children;
- while (child)
- {
- gtk_signal_connect( GTK_OBJECT(child->data), "select",
- GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
-
- if (HasFlag(wxLB_MULTIPLE))
- gtk_signal_connect( GTK_OBJECT(child->data), "deselect",
- GTK_SIGNAL_FUNC(gtk_listitem_deselect_callback), (gpointer)this );
-
- child = child->next;
- }
-}
-