[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop patch for X, please review.

From: Miles Bader
Subject: Re: Drag and drop patch for X, please review.
Date: 20 Jan 2004 11:34:21 +0900

"Jan D." <address@hidden> writes:
> The DND-TYPE is not unique.  That is, when I drop a file from say the
> Gnome file manager, I have several types to choose from, for example,
> text/uri-list, text/plain, UTF8_STRING, and some more.  If a user is
> going to be able to make an intelligent choice, I'd assume he wants to
> look at all acceptable types as a group.

Well why not do so then?  I.e., pass a list of all the acceptable types
as a list to the TEST-FUN.

> Also, there are several types out there that a user can add to the
> alist that the current suggestion just ignores (say application/xml or
> just about any unknown type).  How do we determine which of these are
> more specific?

If it's hard for the calling code to order the possible types, you could
use a simple ordered list instead of an alist, e.g., with entries like
(TEST-FUN . DROP-FUN), TEST-FUN being called with a _list_ of the
available types (+ other info), and the first test returning non-nil
causing the corresponding DROP-FUN to be called.

As a convenience, you could also allow TEST-FUN to be a string, and
consider it to match if the list of types contains it (or whatever).

Come now, if we were really planning to harm you, would we be waiting here, 
 beside the path, in the very darkest part of the forest?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]