From 8366ef71c0437d9dccd45f9b900d589678f298cc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 2 May 2018 02:56:14 +0200 Subject: [PATCH] dnd: Remove gdk_drop_reply() It was only necessary for Motif DND, and we don't support that anymore. --- docs/dnd_internals.txt | 3 --- docs/reference/gdk/gdk4-sections.txt | 1 - gdk/broadway/gdkdnd-broadway.c | 9 --------- gdk/gdkdnd.c | 21 --------------------- gdk/gdkdnd.h | 4 ---- gdk/gdkdndprivate.h | 3 --- gdk/quartz/gdkdnd-quartz.c | 9 --------- gdk/wayland/gdkdnd-wayland.c | 10 ---------- gdk/win32/gdkdnd-win32.c | 18 ------------------ gdk/win32/gdkdrop-win32.c | 18 ------------------ gdk/x11/gdkdnd-x11.c | 11 ----------- gtk/gtkdnd.c | 11 ++--------- 12 files changed, 2 insertions(+), 116 deletions(-) diff --git a/docs/dnd_internals.txt b/docs/dnd_internals.txt index 56266ecb97..02fba41f93 100644 --- a/docs/dnd_internals.txt +++ b/docs/dnd_internals.txt @@ -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); diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 2553c35c2c..a01d39f1e7 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -775,7 +775,6 @@ gdk_cursor_get_type dnd GdkDragContext GdkDragCancelReason -gdk_drop_reply gdk_drag_drop_done gdk_drag_begin gdk_drop_finish diff --git a/gdk/broadway/gdkdnd-broadway.c b/gdk/broadway/gdkdnd-broadway.c index 71545c565c..b5ad024e21 100644 --- a/gdk/broadway/gdkdnd-broadway.c +++ b/gdk/broadway/gdkdnd-broadway.c @@ -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; } diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c index a86f405c8a..d7a58c9850 100644 --- a/gdk/gdkdnd.c +++ b/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 diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h index 5b35f066c4..3babca2307 100644 --- a/gdk/gdkdnd.h +++ b/gdk/gdkdnd.h @@ -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_); diff --git a/gdk/gdkdndprivate.h b/gdk/gdkdndprivate.h index a2fa2b9996..5bb20e7b1c 100644 --- a/gdk/gdkdndprivate.h +++ b/gdk/gdkdndprivate.h @@ -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_); diff --git a/gdk/quartz/gdkdnd-quartz.c b/gdk/quartz/gdkdnd-quartz.c index 4761201017..b9b2656ba5 100644 --- a/gdk/quartz/gdkdnd-quartz.c +++ b/gdk/quartz/gdkdnd-quartz.c @@ -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; } diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 74d9c0e1c9..1ff24fada5 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -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; diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c index 68ed58d3b3..c82c8381af 100644 --- a/gdk/win32/gdkdnd-win32.c +++ b/gdk/win32/gdkdnd-win32.c @@ -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; diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c index 1d9dac87f6..d2a9656a86 100644 --- a/gdk/win32/gdkdrop-win32.c +++ b/gdk/win32/gdkdrop-win32.c @@ -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; diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index d65ed28254..54138c047f 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -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, diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 53bfac3569..6613243566 100644 --- a/gtk/gtkdnd.c +++ b/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;