Closed Bug 1800972 Opened 2 years ago Closed 2 years 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)

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

Attached patch all.patch (deleted) — Splinter Review

Raw all-in-one patch.

Depends on D162463

Depends on D162465

Depends on D162466

Depends on D162467

Depends on D162468

  • 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

Depends on D162473

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

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: