filechooser: Remove code for sidebar pre-arming
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jan 2020 00:12:40 +0000 (19:12 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jan 2020 23:48:22 +0000 (18:48 -0500)
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

index 95addd9936c051a8620a4c13bc21c634592c9f88..3d7d5fd199b7d5e0bceb82cfdec574f7413ee625 100644 (file)
@@ -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);