diff options
author | nyamatongwe <devnull@localhost> | 2006-08-22 22:12:19 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2006-08-22 22:12:19 +0000 |
commit | 0a5e0f0c724c16590a6099fcdd47117d346f3808 (patch) | |
tree | 4d0b137e018b2fdce372221242b463008c657b88 | |
parent | 0c51d2ee4f62116fdfd940289e61110c8281b352 (diff) | |
download | scintilla-mirror-0a5e0f0c724c16590a6099fcdd47117d346f3808.tar.gz |
Changed default drag action to move.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
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<GdkDragAction> + (GDK_ACTION_COPY | GDK_ACTION_MOVE)) { + preferredAction = GDK_ACTION_MOVE; + } + gdk_drag_status(context, preferredAction, dragtime); return FALSE; } |