dnd: Remove unused time arguments

This commit is contained in:
Benjamin Otte 2018-06-16 04:34:48 +02:00
parent b3d424c2d7
commit a2839d157f
5 changed files with 18 additions and 32 deletions

View File

@ -404,7 +404,6 @@ gdk_drag_context_class_init (GdkDragContextClass *klass)
/**
* GdkDragContext::drop-performed:
* @context: The object on which the signal is emitted
* @time: the time at which the drop happened.
*
* The drag and drop operation was performed on an accepting client.
*/
@ -414,8 +413,8 @@ gdk_drag_context_class_init (GdkDragContextClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkDragContextClass, drop_performed),
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkDragContext::dnd-finished:

View File

@ -323,7 +323,7 @@ data_source_dnd_drop_performed (void *data,
{
GdkDragContext *context = data;
g_signal_emit_by_name (context, "drop-performed", GDK_CURRENT_TIME);
g_signal_emit_by_name (context, "drop-performed");
}
static void

View File

@ -2424,8 +2424,7 @@ gdk_dnd_handle_key_event (GdkDragContext *drag,
if ((gdk_drag_context_get_selected_action (drag) != 0) &&
(drag_win32->dest_window != INVALID_HANDLE_VALUE))
{
g_signal_emit_by_name (drag, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));
g_signal_emit_by_name (drag, "drop-performed");
}
else
gdk_drag_context_cancel (drag, GDK_DRAG_CANCEL_NO_TARGET);
@ -2518,8 +2517,7 @@ gdk_dnd_handle_button_event (GdkDragContext *drag,
if ((gdk_drag_context_get_selected_action (drag) != 0))
{
g_signal_emit_by_name (drag, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));
g_signal_emit_by_name (drag, "drop-performed");
}
else
gdk_drag_context_cancel (drag, GDK_DRAG_CANCEL_NO_TARGET);

View File

@ -2325,8 +2325,7 @@ gdk_dnd_handle_key_event (GdkDragContext *context,
if ((gdk_drag_context_get_selected_action (context) != 0) &&
(x11_context->proxy_xid != None))
{
g_signal_emit_by_name (context, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));
g_signal_emit_by_name (context, "drop-performed");
}
else
gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_NO_TARGET);
@ -2415,8 +2414,7 @@ gdk_dnd_handle_button_event (GdkDragContext *context,
if ((gdk_drag_context_get_selected_action (context) != 0) &&
(x11_context->proxy_xid != None))
{
g_signal_emit_by_name (context, "drop-performed",
gdk_event_get_time ((GdkEvent *) event));
g_signal_emit_by_name (context, "drop-performed");
}
else
gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_NO_TARGET);

View File

@ -118,20 +118,16 @@ static GtkDragSourceInfo *gtk_drag_get_source_info (GdkDragContext *context,
gboolean create);
static void gtk_drag_clear_source_info (GdkDragContext *context);
static void gtk_drag_drop (GtkDragSourceInfo *info,
guint32 time);
static void gtk_drag_drop (GtkDragSourceInfo *info);
static void gtk_drag_drop_finished (GtkDragSourceInfo *info,
GtkDragResult result,
guint time);
GtkDragResult result);
static void gtk_drag_cancel_internal (GtkDragSourceInfo *info,
GtkDragResult result,
guint32 time);
GtkDragResult result);
static void gtk_drag_remove_icon (GtkDragSourceInfo *info);
static void gtk_drag_source_info_destroy (GtkDragSourceInfo *info);
static void gtk_drag_context_drop_performed_cb (GdkDragContext *context,
guint time,
GtkDragSourceInfo *info);
static void gtk_drag_context_cancel_cb (GdkDragContext *context,
GdkDragCancelReason reason,
@ -1244,8 +1240,7 @@ gtk_drag_set_icon_default (GdkDragContext *context)
/* Clean up from the drag, and display snapback, if necessary. */
static void
gtk_drag_drop_finished (GtkDragSourceInfo *info,
GtkDragResult result,
guint time)
GtkDragResult result)
{
gboolean success;
@ -1260,8 +1255,7 @@ gtk_drag_drop_finished (GtkDragSourceInfo *info,
}
static void
gtk_drag_drop (GtkDragSourceInfo *info,
guint32 time)
gtk_drag_drop (GtkDragSourceInfo *info)
{
if (info->icon_window)
gtk_widget_hide (info->icon_window);
@ -1341,18 +1335,16 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
*/
static void
gtk_drag_cancel_internal (GtkDragSourceInfo *info,
GtkDragResult result,
guint32 time)
GtkDragResult result)
{
gtk_drag_drop_finished (info, result, time);
gtk_drag_drop_finished (info, result);
}
static void
gtk_drag_context_drop_performed_cb (GdkDragContext *context,
guint32 time_,
GtkDragSourceInfo *info)
{
gtk_drag_drop (info, time_);
gtk_drag_drop (info);
}
static void
@ -1375,7 +1367,7 @@ gtk_drag_context_cancel_cb (GdkDragContext *context,
result = GTK_DRAG_RESULT_ERROR;
break;
}
gtk_drag_cancel_internal (info, result, GDK_CURRENT_TIME);
gtk_drag_cancel_internal (info, result);
}
static void
@ -1396,10 +1388,9 @@ static gboolean
gtk_drag_abort_timeout (gpointer data)
{
GtkDragSourceInfo *info = data;
guint32 time = GDK_CURRENT_TIME;
info->drop_timeout = 0;
gtk_drag_drop_finished (info, GTK_DRAG_RESULT_TIMEOUT_EXPIRED, time);
gtk_drag_drop_finished (info, GTK_DRAG_RESULT_TIMEOUT_EXPIRED);
return G_SOURCE_REMOVE;
}
@ -1461,5 +1452,5 @@ gtk_drag_cancel (GdkDragContext *context)
info = gtk_drag_get_source_info (context, FALSE);
if (info != NULL)
gtk_drag_cancel_internal (info, GTK_DRAG_RESULT_ERROR, gtk_get_current_event_time ());
gtk_drag_cancel_internal (info, GTK_DRAG_RESULT_ERROR);
}