After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 335292 - Drag-drop from file roller drops to the wrong place
Drag-drop from file roller drops to the wrong place
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Cut Copy Paste Undo
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-20 22:36 UTC by Sebastien Bacher
Modified: 2007-12-31 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus patch for dnd to sub folder (592 bytes, patch)
2006-08-03 19:09 UTC, Richard Quirk
none Details | Review
patch in text/plain (595 bytes, patch)
2007-05-24 13:24 UTC, Daniel Holbach
none Details | Review
This time for real. (1.10 KB, patch)
2007-05-24 13:37 UTC, Daniel Holbach
none Details | Review

Description Sebastien Bacher 2006-03-20 22:36:35 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/file-roller/+bug/33707

"Dragging files from file roller drops them to the wrong place.

1 Nautilus open in /home/user/downloads
2 There is a folder /home/user/downloads/stuff visible
3 Open the file /home/user/downloads/text.zip which contains a small text file.
4 Drag the text file to the 'stuff' folder icon. It looks like the file will be dropped there.
5. Let go of the button.
Expected result: The file is extracted into /home/user/downloads/stuff
Acual result:
The file is extracted into /home/user/downloads

This doesn't seem to be the same problesm as Bug #13199 since this is a small file and is successfully extracted. It's as if the drop target was wrongly given as the nautilus current directory, rather than the sub directory you really dragged to."
Comment 1 Sharninder 2006-03-22 10:31:09 UTC
I can confirm this.

This seems to be more of a gnome/nautlus problem than file-roller. It seems that the folder to which the file is being dragged is not recieving the focus at all, instead the main nautilus window gets the focus and that is the where the file is dropped instead of the intended folder.

I haven't checked but file-roller would get the focus window from gnome/nautlus and simply extract the file there. If it gets a wrong directory name, so be it, it'll extract the file to the *wrong* directory.
Comment 2 Richard Quirk 2006-08-01 07:39:36 UTC
The bug is in Nautilus - the function that deals with mutliple URIs being dropped eventually just gets the main view pane and adds the dropped files there.

I've written a patch for it in Nautilus - but I don't know if it's possible to change this bug to "product: nautilus" or should I open a new bug with that status?
Comment 3 Sebastien Bacher 2006-08-02 22:28:05 UTC
changing the product is possible, reassign to nautilus now
Comment 4 Richard Quirk 2006-08-03 19:09:58 UTC
Created attachment 70154 [details] [review]
nautilus patch for dnd to sub folder

This patch changes nautilus-tree-view-drag-dest.c in the function receive_dropped_uri_list. It reuses the receive_uris function, which gets the actual path in the tree dropped to and moves the files there. It makes no difference in icon mode (I don't think that has an easy solution since focus is not passed to the sub folders at all there).

The real problem for tree view mode is in src/file-manager/fm-directory-view.c in fm_directory_view_handle_uri_list_drop. This function has no way to know about the path in the tree that was dropped to - or at least not without exposing a lot of the functions already in nautilus-tree-view-drag-dest.c. It just gets the container directory and drops the files there.

An alternative fix would be to use gtk_tree_view_get_dest_row_at_pos to get the path dropped-to using get_drop_path and get_drop_target from nautilus-tree-view-drag-dest.c, but in the fm_directory_view_handle_uri_list_drop function. That would require more changes, making the 2 static functions mentioned in nautilus-tree-view-drag-dest.c non static and exporting them in header files or similar.
Comment 5 Daniel Holbach 2007-05-24 13:24:10 UTC
Created attachment 88733 [details] [review]
patch in text/plain

Seems the patch that Richard Quirk uploaded was .gz
Comment 6 Daniel Holbach 2007-05-24 13:37:17 UTC
Created attachment 88735 [details] [review]
This time for real.
Comment 7 Daniel Holbach 2007-05-24 13:37:38 UTC
Sorry.
Comment 8 Cosimo Cecchi 2007-12-31 10:20:42 UTC
I can't reproduce this bug with latest (2.21.1) version of Nautilus...dragging a file from file-roller to a folder in a Nautilus window, saves the file in the right place.
I'm closing this bug as OBSOLETE. Feel free to reopen the bug, or open a new one if the problem still occurs. Thanks!