! 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 !
URLs dropped on desktop should create a launcher OR download the URL, depending
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Jimi Bove 2018-11-28 21:08:20 CET
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.
Comment 1 kuko 2019-01-22 12:21:23 CET
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
Comment 2 Jimi Bove 2019-01-22 19:03:34 CET
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?
Comment 3 Jimi Bove 2019-01-22 19:06:09 CET
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.
Comment 4 kuko 2019-01-23 08:46:19 CET
>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
Comment 5 Jimi Bove 2019-01-23 09:29:20 CET
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.
Comment 6 Theo Linkspfeifer editbugs 2019-03-29 23:06:58 CET
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
Comment 7 Jimi Bove 2019-03-30 03:45:48 CET
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!
Comment 8 Theo Linkspfeifer editbugs 2019-03-30 11:06:09 CET
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
Comment 9 Git Bot editbugs 2019-03-30 19:15:54 CET
Andre Miranda referenced this bugreport in commit 81f54f09877d8d5e458ad120de33870cbf4fadf9

Match Thunar DnD behavior (Bug #14919)

https://git.xfce.org/xfce/xfdesktop/commit?id=81f54f09877d8d5e458ad120de33870cbf4fadf9
Comment 10 Andre Miranda editbugs 2019-03-30 19:19:35 CET
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.
Comment 11 Theo Linkspfeifer editbugs 2019-04-01 19:06:39 CEST
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.
Comment 12 Git Bot editbugs 2019-05-10 22:54:26 CEST
Andre Miranda referenced this bugreport in commit 46f1674eb100eb6938504cfe2cb914ce2d363620

Match Thunar DnD behavior (Bug #14919)

https://git.xfce.org/xfce/xfdesktop/commit?id=46f1674eb100eb6938504cfe2cb914ce2d363620
Comment 13 alexxcons editbugs 2019-05-10 23:16:01 CEST
^^ added the first patch as well to the 4.12 branch of xfdesktop
Comment 14 Git Bot editbugs 2019-12-21 22:27:00 CET
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
Comment 15 Git Bot editbugs 2019-12-25 22:11:34 CET
Andre Miranda referenced this bugreport in commit d47db7b803063a9ae96d4ac4c608909899b6431e

Update thumbnail when file changes (Bug #14919)

https://git.xfce.org/xfce/xfdesktop/commit?id=d47db7b803063a9ae96d4ac4c608909899b6431e
Comment 16 Andre Miranda editbugs 2019-12-25 22:12:05 CET
(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.
Comment 17 Andre Miranda editbugs 2019-12-25 22:16:13 CET
Thunar bug: https://bugzilla.xfce.org/show_bug.cgi?id=16304
Comment 18 Git Bot editbugs 2020-01-13 00:17:42 CET
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
Comment 19 Git Bot editbugs 2020-01-13 00:17:47 CET
Andre Miranda referenced this bugreport in commit 258af55f62f068aa1d51481bc8c6449e29a78c88

Update thumbnail when file changes (Bug #14919)

https://git.xfce.org/xfce/xfdesktop/commit?id=258af55f62f068aa1d51481bc8c6449e29a78c88

Bug #14919

Reported by:
Jimi Bove
Reported on: 2018-11-28
Last modified on: 2020-01-13

People

Assignee:
Eric Koegel
CC List:
4 users

Version

Version:
4.12.4

Attachments

poc_chrome_dnd.diff (2.62 KB, patch)
2019-03-30 19:19 CET , Andre Miranda
no flags

Additional information