GNOME Bugzilla – Bug 594144
You are setting "xds.txt" for XDS dnd
Last modified: 2020-11-11 19:13:02 UTC
I've been trying to implement the xds on gedit but I reached to the problem that I'm getting always as filename xds.txt. This a problem for me as I can't know which files should I load. Why don't you set the list of files to load? Maybe using text/uri-list instead of text/plain?
That is a fake file that never changes, it's only used to get the destination folder that will be used by file-roller to extract the files. you have to create a temp folder and pass its path back to file-roller that will extract the dragged files to that folder.
So do I have to create the temp folder, analyze the folder and then load the files? Can't you just send me the uris?
Paolo, I am know very little about xds, but that sounds wrong: it works for nautilus because it doesn't actually need to use the extracted files, but any other app need to know the uri list of the extraced files in order to be able to open them. I think FileRoller should try to get the folder from the drag info and if not set take care of creating a tmp folder in TMPDIR or something like that... the same that happens when you open a file from the archive without extracting it. Then it should tell the uri of these files to the app that received the drop.
the XDS protocol doesn't work this way, there is no step in which the file manager (gedit in this case) gets a file list from the source. Look here for reference: http://freedesktop.org/wiki/Specifications/XDS?action=show&redirect=Standards%2FXDS as I said before gedit has to create a temp directory and pass it to the source as described in step 1 in step 3, if an 's' is received, gedit has to list the content of the temp directory in order to get the extracted files anyway at the moment file-roller sends an 's' as soon as possible without waiting for the files to be actually extracted, this needs to be fixed in order to make DnD work with gedit.
Ok I understand now, thanks for the pointer to the specification. After reading it I am not really sure that it is the right protocol that apps should implement to open a dropped file... the protocol seems very specific to filemanagers. If I recall correctly some years ago dragging files from fileroller to gedit used to work. Would it be possible to also offer the old drag data when doing a drag and drop and let the app handling the drop choose if it wants to use xds or the other?
the previous D&D protocol didn't work correctly because the user had to keep the file over the destination window (gedit in this case) until the extraction was completed, it was a broken way of doing D&D and I don't think it's a good idea to bring it back.
I see... Maybe we could propose to extend the xds protocol... for instance it would be already a step in the right direction if after the extraction file-roller could send S and the list of successfully extracted files. The protocol also doesn't seem to contemplate properly multiple files at once, e.g. what should it respond if only some of the files were extracted successfully. That said it would still have the problem that gedit would be in charge of managing the temporary folder... Another possible extension of the protocol would be a conventional way to let the "receiver" of the drop say "just create a temporary dir" and let the "sender" manage it.
I agree with pbor, shouldn't be too much problem extend the protocol and send the successfully extracted files. I think the main problem is that this protocol was thought only for file managers and it doesn't fit in gedit.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use file-roller and if you still see this bug / want this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/file-roller/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (volunteer workforce and time is limited).