Closed Bug 1800972 Opened 1 year ago Closed 1 year ago

Allow to drag multiple files to file manager

Categories

(Core :: Widget: Gtk, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(9 files)

39.35 KB, patch
Details | Diff | Splinter Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This is followup from Bug 377621. Allow to drag multiple files from attachment to file manager.

See Also: → 377621
Attached patch all.patchSplinter Review

Raw all-in-one patch.

  • Remove nsDragService::CreateURIList() and replace it by nsDragService::SourceDataGetUriList().
    It reads all items from nsITransferable and put them to uri list.
    If data drop is performed to another application which doesn't have access to internal data storages (mailbox:// for instance),
    request download and save referenced items to /tmp directory.

  • Implement SourceDataAppendURLItem() which read one item from nsITransferable and append it to uri list.
    Download and store internal files in /tmp directory.

  • Make CreateTempFile() to block native events processing. nsIOutputStream/nsIInputStream read and write operations run
    event loop and can abort D&D operation before we write all data to /tmp. Use nsAppShell to block native event processing
    during read/write to prevent it.

Depends on D162469

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/5db4ba59d636
[Linux] Update logging and clean up of nsDragService r=emilio
https://hg.mozilla.org/integration/autoland/rev/9ba70bea65b3
[Linux] Use XdndDirectSave on X.org only as it's no supported on XWayland r=emilio
https://hg.mozilla.org/integration/autoland/rev/e2332b082030
[Linux] Factor out XDND to extra function r=emilio
https://hg.mozilla.org/integration/autoland/rev/bfddce18f8bb
[Linux] Factor out image drop r=emilio
https://hg.mozilla.org/integration/autoland/rev/a90dc6dca287
[Linux] Factor out text mime types to extra function r=emilio
https://hg.mozilla.org/integration/autoland/rev/67791213debd
[Linux] Don't query fallback mime type for image/XDND mime types r=emilio
https://hg.mozilla.org/integration/autoland/rev/fdeb8291c355
[Linux] Implement drag of multiple items r=emilio
https://hg.mozilla.org/integration/autoland/rev/575345f98b95
[Linux] Convert char* to GUniquePtr at nsDragService::SourceDataGetXDND() r=emilio
See Also: → 1802096

D&D of multiple targets may fail on Wayland due to different message processing. Let's handle that at Bug 1802098.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: