#include "wx/intl.h"
#include "wx/utils.h"
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
+#include "wx/gtk/private.h"
+
#include <gdk/gdkprivate.h>
#include <gtk/gtkdnd.h>
//-----------------------------------------------------------------------------
#if wxUSE_THREADS
-extern void wxapp_install_thread_wakeup();
-extern void wxapp_uninstall_thread_wakeup();
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/* XPM */
-static char * page_xpm[] = {
+static const char * page_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 5 1",
/* colors */
wxDragResult result;
if ( context->suggested_action == GDK_ACTION_COPY )
result = wxDragCopy;
+ else if ( context->suggested_action == GDK_ACTION_LINK )
+ result = wxDragLink;
else
result = wxDragMove;
GdkDragAction action;
if (result == wxDragCopy)
action = GDK_ACTION_COPY;
+ else if (result == wxDragLink)
+ action = GDK_ACTION_LINK;
else
action = GDK_ACTION_MOVE;
#if wxUSE_THREADS
/* disable GUI threads */
- wxapp_uninstall_thread_wakeup();
#endif
GdkAtom format = drop_target->GetMatchingPair();
#if wxUSE_THREADS
/* re-enable GUI threads */
- wxapp_install_thread_wakeup();
#endif
}
wxDragResult result;
if ( context->suggested_action == GDK_ACTION_COPY )
result = wxDragCopy;
+ else if ( context->suggested_action == GDK_ACTION_LINK )
+ result = wxDragLink;
else
result = wxDragMove;
#if wxUSE_THREADS
/* disable GUI threads */
- wxapp_uninstall_thread_wakeup();
#endif
gtk_selection_data_set( selection_data,
#if wxUSE_THREADS
/* enable GUI threads */
- wxapp_install_thread_wakeup();
#endif
delete[] d;
// "drag_data_delete"
//----------------------------------------------------------------------------
-static void source_drag_data_delete( GtkWidget *WXUNUSED(widget),
- GdkDragContext *WXUNUSED(context),
- wxDropSource *WXUNUSED(drop_source) )
+static void source_drag_data_delete( GtkWidget *WXUNUSED(widget),
+ GdkDragContext *context,
+ wxDropSource *WXUNUSED(drop_source) )
{
if (g_isIdle)
wxapp_install_idle_handler();
wxDragResult action = wxDragNone;
if (source->m_dragContext->action == GDK_ACTION_COPY) action = wxDragCopy;
+ if (source->m_dragContext->action == GDK_ACTION_LINK) action = wxDragLink;
if (source->m_dragContext->action == GDK_ACTION_MOVE) action = wxDragMove;
source->GiveFeedback( action );
#if wxUSE_THREADS
/* disable GUI threads */
- wxapp_uninstall_thread_wakeup();
#endif
/* don't start dragging if no button is down */
if (button_number)
{
- GdkDragAction action = GDK_ACTION_COPY;
- if (allowMove) action = (GdkDragAction)(GDK_ACTION_MOVE|GDK_ACTION_COPY);
+ int action = GDK_ACTION_COPY;
+ if ( allowMove )
+ action |= GDK_ACTION_MOVE;
GdkDragContext *context = gtk_drag_begin( m_widget,
target_list,
- action,
+ (GdkDragAction)action,
button_number, /* number of mouse button which started drag */
(GdkEvent*) &event );
if (context->action == GDK_ACTION_COPY)
m_retValue = wxDragCopy;
+ if (context->action == GDK_ACTION_LINK)
+ m_retValue = wxDragLink;
if (context->action == GDK_ACTION_MOVE)
m_retValue = wxDragMove;
}
#if wxUSE_THREADS
/* re-enable GUI threads */
- wxapp_install_thread_wakeup();
#endif
g_blockEventsOnDrag = FALSE;