Re: inconsistent drag data: x-nautilus-desktop:, network:, etc



Am Freitag, den 24.03.2006, 23:18 -0800 schrieb Jeffrey W. Baker:
> Nautilus seems to provide very different drag data depending on which
> representation of the same thing is being dragged.  Suppose I connect to
> an SMB volume called "something".  If I drag the volume off my desktop,
> I get this:
> 
> x-nautilus-desktop:///something.volume
> 
> If I drag the icon out of the Nautilus "Network" place, I get this:
> 
> network:///volume-something
> 
> If I drag the volume out of the Nautilus cookie-crumb thingy (above
> "Places" and below the back arrow, on the left of the toolbar), I get
> this:
> 
> smb://domain;username servername/something
> 
> As a programmer, only the third form is of any use.  But the user is
> much more likely to drag the icon in the first case.

I agree. The x-nautilus-desktop:/// URIs aren't very useful, so for the
"text/uri-list" drag target we should probably provide the target URIs
of volume links. Once we fix this, you can request the "text/uri-list"
target and do what I will propose below. Internally, we would still use
the "x-special/gnome-icon-list" type with the old semantics, at least
until we figure out whether this breaks anything.

> What am I supposed to do with an x-nautilus-desktop?
> The name implies this is internal data, private to Nautilus.

Exactly. This URI is not known to GnomeVFS.

> I could scan the VFS volume monitor for
> objects with the display name "something", but I think there might be a
> more direct way for me to get the GnomeVFSVolume I want, and I am
> overlooking it.

I think you could ask the volume monitor for all its volumes and check
for each of them, whether the dropped URI matches.

Just for curiosity: What exactly are you trying to implement

-- 
Christian Neumair <chris gnome-de org>




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