X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f542367b72dd900a914c163df7f23ca5e79a60c..3b3dc8019a520ce5e166c8ae9098ba020f8b3f94:/src/gtk1/dnd.cpp diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 1157eef82d..becc53af14 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp +// Name: src/gtk1/dnd.cpp // Purpose: wxDropTarget class // Author: Robert Roebling // Id: $Id$ @@ -10,19 +10,21 @@ // 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/intl.h" -#include "wx/utils.h" -#include "wx/gtk/private.h" +#include "wx/gtk1/private.h" #include @@ -359,7 +361,7 @@ static gboolean target_drag_drop( GtkWidget *widget, 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; @@ -506,12 +508,7 @@ GdkAtom wxDropTarget::GetMatchingPair() GList *child = m_dragContext->targets; while (child) { - // in GTK+ 1.x GdkAtom was a gulong, but now it's a pointer - GdkAtom formatAtom = (GdkAtom) -#ifndef __WXGTK20__ - GPOINTER_TO_INT -#endif - (child->data); + GdkAtom formatAtom = GPOINTER_TO_INT(child->data); wxDataFormat format( formatAtom ); #ifdef __WXDEBUG__ @@ -822,18 +819,14 @@ void wxDropSource::PrepareIcon( int action, GdkDragContext *context ) gdk_window_get_size (pixmap, &width, &height); GdkColormap *colormap = gtk_widget_get_colormap( m_widget ); -#ifndef __WXGTK20__ gtk_widget_push_visual (gdk_colormap_get_visual (colormap)); -#endif gtk_widget_push_colormap (colormap); m_iconWindow = gtk_window_new (GTK_WINDOW_POPUP); gtk_widget_set_events (m_iconWindow, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); gtk_widget_set_app_paintable (GTK_WIDGET (m_iconWindow), TRUE); -#ifndef __WXGTK20__ gtk_widget_pop_visual (); -#endif gtk_widget_pop_colormap (); gtk_widget_set_usize (m_iconWindow, width, height);