From 9c11c605308850519db0c4451feec7fcd69ac2f6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Jan 2020 19:12:40 -0500 Subject: [PATCH] filechooser: Remove code for sidebar pre-arming This is just not a feature we can support currently. Doing it properly would require infrastructure for a generalized :drag(sensitive) state highlighting potential drag sites everywhere. --- gtk/gtkfilechooserwidget.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 95addd9936..3d7d5fd199 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -2042,16 +2042,6 @@ file_list_drag_drop_cb (GtkDropTarget *dest, return TRUE; } -static void -file_list_drag_begin_cb (GtkDragSource *source, - GdkDrag *drag, - GtkFileChooserWidget *impl) -{ - GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl); - - gtk_places_sidebar_set_drop_targets_visible (GTK_PLACES_SIDEBAR (priv->places_sidebar), TRUE, drag); -} - /* Disable the normal tree drag motion handler, it makes it look like you're dropping the dragged item onto a tree item */ static gboolean @@ -2064,17 +2054,6 @@ file_list_drag_motion_cb (GtkDropTarget *dest, return TRUE; } -static void -file_list_drag_end_cb (GtkDragSource *source, - GdkDrag *drag, - gboolean delete_data, - GtkFileChooserWidget *impl) -{ - GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl); - - gtk_places_sidebar_set_drop_targets_visible (GTK_PLACES_SIDEBAR (priv->places_sidebar), FALSE, drag); -} - /* Sensitizes the "Copy file’s location" and other context menu items if there is actually * a selection active. */ @@ -8514,11 +8493,6 @@ post_process_ui (GtkFileChooserWidget *impl) GDK_BUTTON1_MASK, formats, GDK_ACTION_COPY | GDK_ACTION_MOVE); -#if 0 - g_signal_connect (source, "drag-begin", G_CALLBACK (file_list_drag_begin_cb), impl); - g_signal_connect (source, "drag-end", G_CALLBACK (file_list_drag_end_cb), impl); -#endif - dest = gtk_drop_target_new (formats, GDK_ACTION_COPY | GDK_ACTION_MOVE); g_signal_connect (dest, "drag-motion", G_CALLBACK (file_list_drag_motion_cb), impl);