]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
no message
[wxWidgets.git] / src / gtk / listbox.cpp
index 630925e13509d829cf3513d02ece8a2064926911..fb6ef44edc696e5527b828096af9cc12610e1a4d 100644 (file)
 #include "wx/intl.h"
 #include "wx/checklst.h"
 
+#if wxUSE_DRAG_AND_DROP
+#include "wx/dnd.h"
+#endif
+
+#include "gdk/gdk.h"
+#include "gtk/gtk.h"
+
 //-------------------------------------------------------------------------
 // conditional compilation
 //-------------------------------------------------------------------------
@@ -316,9 +323,11 @@ void wxListBox::AppendCommon( const wxString &item )
 
     ConnectWidget( list_item );
 
+#if wxUSE_DRAG_AND_DROP
 #ifndef NEW_GTK_DND_CODE
     if (m_dropTarget) m_dropTarget->RegisterWidget( list_item );
 #endif
+#endif
 }
 
 void wxListBox::Append( const wxString &item )
@@ -414,7 +423,7 @@ void wxListBox::Delete( int n )
 
     wxCHECK_RET( child, "wrong listbox index" );
 
-    GList *list = g_list_append( NULL, child->data );
+    GList *list = g_list_append( (GList*) NULL, child->data );
     gtk_list_remove_items( m_list, list );
     g_list_free( list );
 
@@ -647,6 +656,7 @@ int wxListBox::GetIndex( GtkWidget *item ) const
     return -1;
 }
 
+#if wxUSE_DRAG_AND_DROP
 void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
 {
     wxCHECK_RET( m_list != NULL, "invalid listbox" );
@@ -677,6 +687,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
     }
 #endif
 }
+#endif
 
 GtkWidget *wxListBox::GetConnectWidget()
 {