Now that https://bugzilla.xfce.org/show_bug.cgi?id=9632 and https://bugzilla.xfce.org/show_bug.cgi?id=12766 have been seemingly solved, I think it's time for the final piece of the pie that is standard file browser behavior most people expect. That is, if they drag an URL that happens to be pointing to an image, or some other non-webpage type of file (perhaps determined by mimetype), onto the desktop or into Thunar, then it is downloaded in what appears to the user as a file transfer dialog rather than linked. Or perhaps the option is added for both, using the Ctrl or Shift keys as shortcuts while dragging, and the link and copy emblems on the cursor to make it completely clear (I still get the copy emblem when I drag a link, even though it will link, not copy, which is unfortunate). This would have the benefits of being more predictable and easier to implement than mimetype-checking, but the drawback of being less clear/expected to a layman user coming from Mac or Windows or something. Personally, I'm fine with either option. Maybe leaning towards that latter one, but not my call.
this is not a thunar issue and would require an external program to work, like wget imo what should happen when a url is dnd on the destop is - to create a text file with the url in it
It's a standard feature of any other file browser I've used, though. Why should it involving wget be a reason for it not to be added? Doesn't thunar already support drag n' dropping over network sources it supports, such as FTP and samba? Do those features involve external programs? If they don't, why it HTTP different?
Something I forgot to mention in that last comment: it's a feature lots of people might expect. You want to save an image, so you drag it from your browser to a folder on your system. I don't see why that shouldn't be an option. Right now, the only way to accomplish this is to save the image through the browser's own interface and navigate to whatever folder you want it in each time, for each image you're saving. It's such a worse, more roundabout workflow that people who want to save multiple images have to use browsers with extra functionality (usually a Firefox extension) just to get the job done, while people on any other file browser have it much easier. I don't see why this extra annoyance is necessary.
>It's a standard feature of any other file browser I've used is that macosx? afaik no one uses drag and drop to save an image from their web browser but you are welcome to submit a pr
The other file browsers I've used in Linux are Dolphin (KDE) and Nautilus (before the GNOME 3 days), and both had this functionality when I used them. I believe OS X also probably does, although these days I'd expect they'd prefer their users drag it into the Photos app or something (like GNOME today, they strongly de-emphasize using an actual file browser so much as a file searcher and a bunch of apps), and every browser I've used in Windows (not just Explorer) has it too. I will submit a patch if/when I have the time. I don't have any experience with thunar's codebase, but I do care about this enough to give it a try sometime.
Reverting the following commit achieves the desired behavior when using Firefox: https://git.xfce.org/xfce/xfdesktop/commit/?id=7794bd7d684218bc354ec914e48905cd279607a1 This matches how Thunar works. However, with Chromium the transfer of media files does not work either way. The linked commit changes it so that the "Create URL Link" dialog is shown (not very useful anyway I would think). xfdesktop 4.13.3 Thunar 1.8.4
Huh, a commit from 2015. That explains why I vaguely remember Thunar having this functionality once before. Other people have more recently had me convinced that my memory was faulty there. Thanks for tracking that down!
Support for XdndDirectSave was only recently implemented in Firefox (64+), so that explains why Thunar and xfdesktop (without the commit) can both handle this type of file transfer now. https://bugzilla.mozilla.org/show_bug.cgi?id=396370
Andre Miranda referenced this bugreport in commit 81f54f09877d8d5e458ad120de33870cbf4fadf9 Match Thunar DnD behavior (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=81f54f09877d8d5e458ad120de33870cbf4fadf9
Created attachment 8369 poc_chrome_dnd.diff The attached patch is a proof of concept for supporting Chrome's DnD, it works but it needs more testing. Of course, the same code would be necessary for Thunar.
I tested the code with Chromium and it worked fine. One little issue remaining with Firefox and XdndDirectSave is that xfdesktop does not show the thumbnail for a transferred file unless I do a refresh or perform some file operation.
Andre Miranda referenced this bugreport in commit 46f1674eb100eb6938504cfe2cb914ce2d363620 Match Thunar DnD behavior (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=46f1674eb100eb6938504cfe2cb914ce2d363620
^^ added the first patch as well to the 4.12 branch of xfdesktop
Andre Miranda referenced this bugreport in commit 5a8c7f6152b15078dd81407dc5da3b5b8b4960d6 Add DnD support for application/octet-stream (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=5a8c7f6152b15078dd81407dc5da3b5b8b4960d6
Andre Miranda referenced this bugreport in commit d47db7b803063a9ae96d4ac4c608909899b6431e Update thumbnail when file changes (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=d47db7b803063a9ae96d4ac4c608909899b6431e
(In reply to Theo Linkspfeifer from comment #11) > One little issue remaining with Firefox and XdndDirectSave is that xfdesktop > does not show the thumbnail for a transferred file unless I do a refresh or > perform some file operation. Fixed by the commit above.
Thunar bug: https://bugzilla.xfce.org/show_bug.cgi?id=16304
Andre Miranda referenced this bugreport in commit 8f2cd144e906fce060e03bf147a1e19f0e1e55a0 Add DnD support for application/octet-stream (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=8f2cd144e906fce060e03bf147a1e19f0e1e55a0
Andre Miranda referenced this bugreport in commit 258af55f62f068aa1d51481bc8c6449e29a78c88 Update thumbnail when file changes (Bug #14919) https://git.xfce.org/xfce/xfdesktop/commit?id=258af55f62f068aa1d51481bc8c6449e29a78c88