Handle multiple file drops on mozilla (gtk build) using the text/uri-list target

RESOLVED FIXED

Status

()

Core
XUL
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: James Henstridge, Assigned: blizzard)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
At the moment, it is not possible to drop multiple files from a file manager
such as nautilus on mozilla.  The de-facto standard for multi-file drops is to
use the text/uri-list target.  It is not possible to handle these drops from the
javascript layer because the data format for text/uri-list drops is ascii,
rather than 2 byte unicode, so the data gets misinterpreted.

Attached is a patch that adds support for text/uri-list, by treating it like a
drop of multiple text/x-moz-url flavour items.  This should make text/uri-list
drops usable to javascript DND Observers, while not needing special knowledge of
the conventions used on X11 dnd.
(Reporter)

Comment 1

16 years ago
Created attachment 55829 [details] [diff] [review]
Convert text/uri-list drops to a multi-file text/x-moz-url drop
(Reporter)

Comment 2

16 years ago
Created attachment 55832 [details]
Simple XUL example to test text/uri-list drops

Updated

16 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

16 years ago
Comment on attachment 55829 [details] [diff] [review]
Convert text/uri-list drops to a multi-file text/x-moz-url drop

r=markh
Attachment #55829 - Flags: review+
blizzard, can you sr= and maybe check this in?

/be
Assignee: hyatt → blizzard
(Assignee)

Comment 5

16 years ago
The code looks fine.  Can you pull the two parser loops into seperate functions
to make it more readable and maintainable, please?
(Reporter)

Comment 6

16 years ago
Created attachment 56000 [details] [diff] [review]
second attempt, with text/uri-list parsing code split into helper functions
(Assignee)

Comment 7

16 years ago
Comment on attachment 56000 [details] [diff] [review]
second attempt, with text/uri-list parsing code split into helper functions

sr=blizzard
Attachment #56000 - Flags: superreview+
(Assignee)

Comment 8

16 years ago
Checked in on behalf of James.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.