! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
drag&drop to bookmarks: silently prevent to add new bookmark if it's a file
Status:
RESOLVED: FIXED

Comments

Description cellstorm 2018-11-29 12:25:51 CET
Dear XFCE developers,

In Thunar 1.8.2 (Debian sid package), when dragging a file to one of the bookmarks in sidebar, at dropping, when not aiming properly, there it is possible that the file gets "added to bookmarks" which results in an error message popup, disturbing the Workflow: "Failed to add new shortcut       The path "foo" does not refer to a directory" 
Very annoying if you want to drag &drop lots of files into bookmarks. So best would be if this would not be not possible at all, and even the option that a bookmark can be placed should be disabled when it's a file which is currently dragged.

Question is: Can the data of the dragged object already be accessed while dragging and without dropping, and when entering the sidebar the right actions are activated/deactivated? 
In comparison, Nemo does also let the file drop as it would create a new bookmark, but then the whole action gets "rejected", and the file's icon flows back to its origin over the screen.

Another special case is when dragging and dropping multiple files and folders. The current behavior is that files get rejected as above, and folders are added to the bookmarks list, which is not the right behavior either, from my perspective. I would suggest to prevent adding to bookmarks if it is mixed content, and if it's only folders, It would be best to ask the user if he really intends to create multiple bookmarks or just wants to drag folders onto one bookmark.
Comment 1 Andre Miranda editbugs 2018-12-17 01:56:33 CET
Created attachment 8186 
Preliminary patch
Comment 2 Theo Linkspfeifer editbugs 2019-04-23 14:54:26 CEST
Tested the patch and it works fine.

The user is still allowed to add multiple directories at once, but that matches the behavior of Nautilus/Nemo/Caja.
Comment 3 Git Bot editbugs 2019-06-18 01:51:23 CEST
Andre Miranda referenced this bugreport in commit 40a7dfb607b57e038b638c99985ab6eadbd73efa

Prevent new bookmarks on sidebar when dragging files (Bug #14921)

https://git.xfce.org/xfce/thunar/commit?id=40a7dfb607b57e038b638c99985ab6eadbd73efa
Comment 4 Git Bot editbugs 2019-06-18 01:52:15 CEST
Andre Miranda referenced this bugreport in commit 2b30baf72232e8618cf23e26d0c78db779e3f397

Prevent new bookmarks on sidebar when dragging files (Bug #14921)

https://git.xfce.org/xfce/thunar/commit?id=2b30baf72232e8618cf23e26d0c78db779e3f397

Bug #14921

Reported by:
cellstorm
Reported on: 2018-11-29
Last modified on: 2019-06-18

People

Assignee:
Xfce Bug Triage
CC List:
5 users

Version

Attachments

Preliminary patch (2.17 KB, patch)
2018-12-17 01:56 CET , Andre Miranda
no flags

Additional information