From 23fd8b19a3cdd66aff6e66b87bd8fecb780fa82a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 22 Aug 2006 22:12:19 +0000 Subject: Changed default drag action to move. --- gtk/ScintillaGTK.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 9b7a0baae..5dc998a07 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2329,14 +2329,17 @@ void ScintillaGTK::DragBegin(GtkWidget *, GdkDragContext *) { } gboolean ScintillaGTK::DragMotion(GtkWidget *widget, GdkDragContext *context, - gint x, gint y, guint dragtime) { + gint x, gint y, guint dragtime) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); - //Platform::DebugPrintf("DragMotion %d %d %x %x %x\n", x, y, - // context->actions, context->suggested_action, sciThis); Point npt(x, y); sciThis->inDragDrop = true; sciThis->SetDragPosition(sciThis->PositionFromLocation(npt)); - gdk_drag_status(context, context->suggested_action, dragtime); + GdkDragAction preferredAction = context->suggested_action; + if (context->actions == static_cast + (GDK_ACTION_COPY | GDK_ACTION_MOVE)) { + preferredAction = GDK_ACTION_MOVE; + } + gdk_drag_status(context, preferredAction, dragtime); return FALSE; } -- cgit v1.2.3