Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nsIClipboard vs. nsIDragService

24 views
Skip to first unread message

Jim

unread,
Jan 7, 2011, 11:42:18 PM1/7/11
to
I've been attempting to fix up Thunderbird's attachment handling in a
few places, and I thought I'd work on reading in files from the
clipboard. Currently you can drag and drop files into a message, and I
figured it'd be pretty similar to make the clipboard work (they both
seem to use nsITransferable).

However, at least under GTK, it's impossible to get the clipboard
object by looking for data with the flavor "application/x-moz-file",
which works for drag-and-drop. I noticed that in gtk2/
nsDragSession.cpp, there's some special handling for that flavor
that's absent from gtk2/nsClipboard.cpp <http://mxr.mozilla.org/comm-
central/source/mozilla/widget/src/gtk2/nsDragService.cpp#563>.

Is this just a case of the two things being out-of-sync, or is this
intentional? If the former, does this problem exist on other
platforms, and what would be entailed in fixing it? If the latter,
what's the recommended way to go about reading a file object from the
clipboard?

- Jim

Neil Deakin

unread,
Jan 8, 2011, 9:52:11 AM1/8/11
to
On 07/01/11 11:42 PM, Jim wrote:
> Is this just a case of the two things being out-of-sync, or is this
> intentional?

The former. Support for specific types on each platform has mostly been
determined by those willing to implement it.

Jim

unread,
Jan 8, 2011, 3:52:28 PM1/8/11
to

Is there a good person to contact about this then? I'm perfectly
willing to work on patching this, although it would be nice to have
someone who knows what's going on to consult, especially since I'm not
familiar with policies outside of mail/mailnews.

- Jim

0 new messages