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

On Fri, 2006-03-24 at 23:18 -0800, Jeffrey W. Baker wrote:
> 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.  What am I supposed
> to do with an x-nautilus-desktop?  The name implies this is internal
> data, private to Nautilus.  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.

x-nautilus-desktop: shouldn't be leaking out of nautilus, as its an
internal-only thing. We probably need to plug that at some place we've

Wrt to uris pointing to the selected icon or the file that points to,
this is a problematic issue. In some cases you really want to
distinguish the volume icon from the path where its mounted, so we can't
really always pass the activation uri. (For instance, then you couldn't
ever copy a desktop file link, as you'd be copying what it points too.)

However, if you just want to open the location it points to, just look
at the URL key in the file (its a desktop file). Also, it has a
X-Gnome-Volume key that you can read and look up the GnomeVFSVolume with

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a sword-wielding white trash shaman in a wheelchair. She's a cynical 
green-skinned politician with the soul of a mighty warrior. They fight crime! 

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