From bug 310819 [1]: "If ... you have opened a big directory with many directories you are not able any more to drag for example a file from the desktop into this directory ... ." Proposed patch attached, which makes Nautilus only accept the drop path if you're directly above it with the mouse. [1] http://bugzilla.gnome.org/show_bug.cgi?id=310819 -- Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-tree-view-drag-dest.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-tree-view-drag-dest.c,v
retrieving revision 1.11
diff -u -p -r1.11 nautilus-tree-view-drag-dest.c
--- libnautilus-private/nautilus-tree-view-drag-dest.c 6 Jul 2005 12:18:27 -0000 1.11
+++ libnautilus-private/nautilus-tree-view-drag-dest.c 20 Jul 2005 14:43:02 -0000
@@ -142,10 +142,16 @@ expand_timeout (gpointer data)
{
GtkTreeView *tree_view;
GtkTreePath *drop_path;
+ GtkTreeViewDropPosition pos;
tree_view = GTK_TREE_VIEW (data);
- gtk_tree_view_get_drag_dest_row (tree_view, &drop_path, NULL);
+ gtk_tree_view_get_drag_dest_row (tree_view, &drop_path, &pos);
+ if (pos == GTK_TREE_VIEW_DROP_BEFORE ||
+ pos == GTK_TREE_VIEW_DROP_AFTER) {
+ gtk_tree_path_free (drop_path);
+ drop_path = NULL;
+ }
if (drop_path) {
gtk_tree_view_expand_row (tree_view, drop_path, FALSE);
@@ -421,6 +427,11 @@ drag_motion_callback (GtkWidget *widget,
gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos);
+ if (pos == GTK_TREE_VIEW_DROP_BEFORE ||
+ pos == GTK_TREE_VIEW_DROP_AFTER) {
+ gtk_tree_path_free (path);
+ path = NULL;
+ }
if (!dest->details->have_drag_data) {
@@ -509,6 +520,11 @@ receive_uris (NautilusTreeViewDragDest *
gtk_tree_view_get_dest_row_at_pos (dest->details->tree_view, x, y,
&path, &pos);
+ if (pos == GTK_TREE_VIEW_DROP_BEFORE ||
+ pos == GTK_TREE_VIEW_DROP_AFTER) {
+ gtk_tree_path_free (path);
+ path = NULL;
+ }
drop_path = get_drop_path (dest, path);
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil