Closed Bug 107492 Opened 23 years ago Closed 23 years ago

trouble handling text/uri-list drops from gnome apps

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: james, Assigned: hyatt)

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
BuildID:    2001101201

When recieving drops of text/uri-list type from other gnome apps (eg. nautilus
or GMC file managers), the drag data gets garbled by the time my javascript DND
observer can handle it.

It looks like the ASCII drag data is being interpreted as a 2-byte unicode
string or something.

I will attach an example XUL file that demonstrates the problem.

Reproducible: Always
Steps to Reproduce:
1. load example XUL file as chrome
2. drag file(s) from nautilus and drop them on the <groupbox>


Actual Results:  Garbled text from the drop displayed

Expected Results:  Display list of URIs for the files dragged from nautilus.

I guess the same sort of problems would occur when trying to interoperate in the
other direction (dragging text/uri-list's from moz to nautilus), the other side
getting 2-byte unicode instead of ascii text.
To reproduce the problem, copy the attached XUL file to the chrome directory,
and load it as chrome (mozilla -chrome chrome://...).  Drag one or more files
from nautilus (or GMC) to the groupbox.  The drag data will be displayed inside
the groupbox.

I tried adding setting the data type for the text/uri-list DND flavour to
nsISupportsString (instead of the default wstring), but that didn't help.
I managed to get text/uri-list drops on mozilla working a different way, and
have attached the fix to bug 107651.  Instead of trying to handle text/uri-list
drops at the javascript layer, I break the data up at the C++ layer to make it
look like a multi-item text/x-moz-url drop.

Feel free to resolve this as WONTFIX if you think it is appropriate.
marking WONTFIX, as text/uri-list drops are supported in 0.9.6 (bug 107651), and
text/uri-list drags should be supported in 0.9.7 (bug 109798).  The fix going in
hides the use of the platform specific text/uri-list, so it only sees
text/x-moz-url.

It would be useful for mozilla to be able to interoperate with other apps that
don't use UTF16 encoded drag data (which are the norm on X -- they usually use
ascii or UTF8 encoded strings instead), but that is a different bug.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: