]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dnd.cpp
Correct compilation for GTK < 2.4.
[wxWidgets.git] / src / gtk / dnd.cpp
index 884ad11f274d60cd4661ba7034eda66418b58295..ffd858bc7671da6c176f725146564777467ed252 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        dnd.cpp
+// Name:        src/gtk/dnd.cpp
 // Purpose:     wxDropTarget class
 // Author:      Robert Roebling
 // Id:          $Id$
 // Purpose:     wxDropTarget class
 // Author:      Robert Roebling
 // Id:          $Id$
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/dnd.h"
-#include "wx/log.h"
+#if wxUSE_DRAG_AND_DROP
 
 
+#include "wx/dnd.h"
 
 
-#if wxUSE_DRAG_AND_DROP
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/app.h"
+    #include "wx/utils.h"
+    #include "wx/window.h"
+#endif
 
 
-#include "wx/window.h"
-#include "wx/app.h"
 #include "wx/gdicmn.h"
 #include "wx/gdicmn.h"
-#include "wx/intl.h"
-#include "wx/utils.h"
 
 #include "wx/gtk/private.h"
 
 
 #include "wx/gtk/private.h"
 
@@ -336,7 +338,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
     }
     else
     {
     }
     else
     {
-        wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned TRUE") );
+        wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") );
 
 #if wxUSE_THREADS
         /* disable GUI threads */
 
 #if wxUSE_THREADS
         /* disable GUI threads */
@@ -345,7 +347,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
         GdkAtom format = drop_target->GetMatchingPair();
 
         // this does happen somehow, see bug 555111
         GdkAtom format = drop_target->GetMatchingPair();
 
         // this does happen somehow, see bug 555111
-        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") )
+        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") );
 
 /*
         GdkDragAction action = GDK_ACTION_MOVE;
 
 /*
         GdkDragAction action = GDK_ACTION_MOVE;
@@ -414,7 +416,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
 
     if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) )
     {
 
     if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) )
     {
-        wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned TRUE") );
+        wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
 
         /* tell GTK that data transfer was successful */
         gtk_drag_finish( context, TRUE, FALSE, time );
 
         /* tell GTK that data transfer was successful */
         gtk_drag_finish( context, TRUE, FALSE, time );
@@ -797,7 +799,7 @@ void wxDropSource::PrepareIcon( int action, GdkDragContext *context )
     GdkPixmap *pixmap = icon->GetPixmap();
 
     gint width,height;
     GdkPixmap *pixmap = icon->GetPixmap();
 
     gint width,height;
-    gdk_window_get_size (pixmap, &width, &height);
+    gdk_drawable_get_size (pixmap, &width, &height);
 
     GdkColormap *colormap = gtk_widget_get_colormap( m_widget );
     gtk_widget_push_colormap (colormap);
 
     GdkColormap *colormap = gtk_widget_get_colormap( m_widget );
     gtk_widget_push_colormap (colormap);