Alvin wrote:
> I welcome any comments or suggestions.
Nice -- thanks for that!
I gave it a try on my fedora 3 system with 1.1.x.
Example compiled fine, and shows much promise.
Didn't work for me when I tried to drag a local image from Firefox
while browsing a local directory; when I dropped the image, it said
"Invalid number of files being dropped: 0."
I think this is because Firefox is sending 2 bytes per character
(wide chars). I dumped the first 10 bytes of 'urls' to stdout and
piped it through 'od -x', and found it was getting the hex sequence:
68 00 74 00 74 00 70 00 3a 00
..which is the first part of "http:" with a null after every character.
So to support Firefox, possibly just checking to see if a) the string
length is greater than 2, and urls[1] == 0, and if so, assume wide
chars,
and just skip every other byte to accumulate the string.
Tried also with default konqueror (3.3.0-8) for fedora3 browsing /tmp.
Konqueror always seems to change my typing of /tmp into "file:/tmp",
so when I drag an image over, I get a dialog saying:
Unsupported URL: file:/tmp/foo.jpg^M
That's probably an easy fix to just recognize the "file:" prefix
and just strip it off to get the actual filename.
But I can tell it should probably work fine with that small mod.
Good article.. makes me want to add more D+D features to my apps.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk