forked from AuroraMiddleware/gtk
dnd: Remove gdk_drop_reply()
It was only necessary for Motif DND, and we don't support that anymore.
This commit is contained in:
parent
fb53568c04
commit
8366ef71c0
@ -71,9 +71,6 @@ straightforward manner.
|
||||
void gdk_drag_status (GdkDragContext *context,
|
||||
GdkDragAction action,
|
||||
guint32 time);
|
||||
void gdk_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time);
|
||||
void gdk_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time);
|
||||
|
@ -775,7 +775,6 @@ gdk_cursor_get_type
|
||||
<FILE>dnd</FILE>
|
||||
GdkDragContext
|
||||
GdkDragCancelReason
|
||||
gdk_drop_reply
|
||||
gdk_drag_drop_done
|
||||
gdk_drag_begin
|
||||
gdk_drop_finish
|
||||
|
@ -128,14 +128,6 @@ gdk_broadway_drag_context_drag_status (GdkDragContext *context,
|
||||
g_return_if_fail (context != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time)
|
||||
{
|
||||
g_return_if_fail (context != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
@ -165,6 +157,5 @@ gdk_broadway_drag_context_class_init (GdkBroadwayDragContextClass *klass)
|
||||
context_class->drag_status = gdk_broadway_drag_context_drag_status;
|
||||
context_class->drag_abort = gdk_broadway_drag_context_drag_abort;
|
||||
context_class->drag_drop = gdk_broadway_drag_context_drag_drop;
|
||||
context_class->drop_reply = gdk_broadway_drag_context_drop_reply;
|
||||
context_class->drop_finish = gdk_broadway_drag_context_drop_finish;
|
||||
}
|
||||
|
21
gdk/gdkdnd.c
21
gdk/gdkdnd.c
@ -534,27 +534,6 @@ gdk_drag_drop (GdkDragContext *context,
|
||||
GDK_DRAG_CONTEXT_GET_CLASS (context)->drag_drop (context, time_);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drop_reply:
|
||||
* @context: a #GdkDragContext
|
||||
* @accepted: %TRUE if the drop is accepted
|
||||
* @time_: the timestamp for this operation
|
||||
*
|
||||
* Accepts or rejects a drop.
|
||||
*
|
||||
* This function is called by the drag destination in response
|
||||
* to a drop initiated by the drag source.
|
||||
*/
|
||||
void
|
||||
gdk_drop_reply (GdkDragContext *context,
|
||||
gboolean accepted,
|
||||
guint32 time_)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
|
||||
|
||||
GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_reply (context, accepted, time_);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drop_finish:
|
||||
* @context: a #GdkDragContext
|
||||
|
@ -108,10 +108,6 @@ void gdk_drag_status (GdkDragContext *context,
|
||||
GdkDragAction action,
|
||||
guint32 time_);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_drop_reply (GdkDragContext *context,
|
||||
gboolean accepted,
|
||||
guint32 time_);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time_);
|
||||
|
@ -40,9 +40,6 @@ struct _GdkDragContextClass {
|
||||
guint32 time_);
|
||||
void (*drag_drop) (GdkDragContext *context,
|
||||
guint32 time_);
|
||||
void (*drop_reply) (GdkDragContext *context,
|
||||
gboolean accept,
|
||||
guint32 time_);
|
||||
void (*drop_finish) (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time_);
|
||||
|
@ -78,14 +78,6 @@ gdk_quartz_drag_context_drag_status (GdkDragContext *context,
|
||||
context->action = action;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
@ -128,6 +120,5 @@ gdk_quartz_drag_context_class_init (GdkQuartzDragContextClass *klass)
|
||||
context_class->drag_status = gdk_quartz_drag_context_drag_status;
|
||||
context_class->drag_abort = gdk_quartz_drag_context_drag_abort;
|
||||
context_class->drag_drop = gdk_quartz_drag_context_drag_drop;
|
||||
context_class->drop_reply = gdk_quartz_drag_context_drop_reply;
|
||||
context_class->drop_finish = gdk_quartz_drag_context_drop_finish;
|
||||
}
|
||||
|
@ -234,15 +234,6 @@ gdk_wayland_drag_context_drag_status (GdkDragContext *context,
|
||||
wayland_context->selected_action = action;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean accepted,
|
||||
guint32 time_)
|
||||
{
|
||||
if (!accepted)
|
||||
gdk_wayland_drop_context_set_status (context, accepted);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
@ -438,7 +429,6 @@ gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
|
||||
context_class->drag_status = gdk_wayland_drag_context_drag_status;
|
||||
context_class->drag_abort = gdk_wayland_drag_context_drag_abort;
|
||||
context_class->drag_drop = gdk_wayland_drag_context_drag_drop;
|
||||
context_class->drop_reply = gdk_wayland_drag_context_drop_reply;
|
||||
context_class->drop_finish = gdk_wayland_drag_context_drop_finish;
|
||||
context_class->drop_finish = gdk_wayland_drag_context_drop_finish;
|
||||
context_class->read_async = gdk_wayland_drag_context_read_async;
|
||||
|
@ -2494,23 +2494,6 @@ gdk_win32_drag_context_drag_status (GdkDragContext *context,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time)
|
||||
{
|
||||
g_return_if_fail (context != NULL);
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drop_reply\n"));
|
||||
|
||||
if (!use_ole2_dnd)
|
||||
if (context->dest_surface)
|
||||
{
|
||||
if (GDK_WIN32_DRAG_CONTEXT (context)->protocol == GDK_DRAG_PROTO_WIN32_DROPFILES)
|
||||
_gdk_dropfiles_store (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
@ -3234,7 +3217,6 @@ gdk_win32_drag_context_class_init (GdkWin32DragContextClass *klass)
|
||||
context_class->drag_motion = gdk_win32_drag_context_drag_motion;
|
||||
context_class->drag_abort = gdk_win32_drag_context_drag_abort;
|
||||
context_class->drag_drop = gdk_win32_drag_context_drag_drop;
|
||||
context_class->drop_reply = gdk_win32_drag_context_drop_reply;
|
||||
context_class->drop_finish = gdk_win32_drag_context_drop_finish;
|
||||
|
||||
context_class->get_drag_surface = gdk_win32_drag_context_get_drag_surface;
|
||||
|
@ -874,23 +874,6 @@ gdk_win32_drop_context_drag_status (GdkDragContext *context,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_drop_context_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time)
|
||||
{
|
||||
g_return_if_fail (context != NULL);
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drop_reply\n"));
|
||||
|
||||
if (!use_ole2_dnd)
|
||||
if (context->dest_surface)
|
||||
{
|
||||
if (GDK_WIN32_DRAG_CONTEXT (context)->protocol == GDK_DRAG_PROTO_WIN32_DROPFILES)
|
||||
_gdk_dropfiles_store (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_display_put_event (GdkDisplay *display,
|
||||
GdkEvent *event)
|
||||
@ -1213,7 +1196,6 @@ gdk_win32_drop_context_class_init (GdkWin32DropContextClass *klass)
|
||||
object_class->finalize = gdk_win32_drop_context_finalize;
|
||||
|
||||
context_class->drag_status = gdk_win32_drop_context_drag_status;
|
||||
context_class->drop_reply = gdk_win32_drop_context_drop_reply;
|
||||
context_class->drop_finish = gdk_win32_drop_context_drop_finish;
|
||||
context_class->read_async = gdk_win32_drop_context_read_async;
|
||||
context_class->read_finish = gdk_win32_drop_context_read_finish;
|
||||
|
@ -243,9 +243,6 @@ static void gdk_x11_drag_context_drag_abort (GdkDragContext *context,
|
||||
guint32 time_);
|
||||
static void gdk_x11_drag_context_drag_drop (GdkDragContext *context,
|
||||
guint32 time_);
|
||||
static void gdk_x11_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean accept,
|
||||
guint32 time_);
|
||||
static void gdk_x11_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time_);
|
||||
@ -402,7 +399,6 @@ gdk_x11_drag_context_class_init (GdkX11DragContextClass *klass)
|
||||
context_class->drag_status = gdk_x11_drag_context_drag_status;
|
||||
context_class->drag_abort = gdk_x11_drag_context_drag_abort;
|
||||
context_class->drag_drop = gdk_x11_drag_context_drag_drop;
|
||||
context_class->drop_reply = gdk_x11_drag_context_drop_reply;
|
||||
context_class->drop_finish = gdk_x11_drag_context_drop_finish;
|
||||
context_class->read_async = gdk_x11_drag_context_read_async;
|
||||
context_class->read_finish = gdk_x11_drag_context_read_finish;
|
||||
@ -2450,13 +2446,6 @@ gdk_x11_drag_context_drag_status (GdkDragContext *context,
|
||||
context_x11->old_action = action;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_drag_context_drop_reply (GdkDragContext *context,
|
||||
gboolean accepted,
|
||||
guint32 time_)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_drag_context_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
|
11
gtk/gtkdnd.c
11
gtk/gtkdnd.c
@ -468,15 +468,8 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
|
||||
/* Send a reply.
|
||||
*/
|
||||
if (event_type == GDK_DRAG_MOTION)
|
||||
{
|
||||
if (!found)
|
||||
gdk_drag_status (context, 0, time);
|
||||
}
|
||||
else if (event_type == GDK_DROP_START)
|
||||
{
|
||||
gdk_drop_reply (context, found, time);
|
||||
}
|
||||
if (!found)
|
||||
gdk_drag_status (context, 0, time);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user