Re: Gnome-VFS, computer: and mounting



On Mon, 2006-07-03 at 12:21 +0200, nf2 wrote:

> >> xdg_vfs_gnome get computer:///CD-RW%252FDVD%25C2%25B1R%2520Drive.drive
> >> [Desktop Entry]
> >> Encoding=UTF-8
> >> Name=CD-RW/DVD±R Drive
> >> Type=FSDevice
> >> Icon=gnome-dev-removable
> >> URL=(null)
> >>
> >> I guess there is a way to look up the appropriate drive and call 
> >> gnome_vfs_drive_mount (), but i don't know how... Will the name returned 
> >> by gnome_vfs_drive_get_display_name () exactly match the "Name" 
> >> attribute of the desktop entry?
> >>     
> >
> > There should be a X-Gnome-Drive line that you could look at. However,
> > using computer:/// (which is just a UI thing) instead of the proper
> > volume manager API sounds like a horrible hack prone to breaking in
> > various ways.
> >
> >   
> Hmm. Could you please explain this? What's the point of "computer:", if 
> it can't be treated as the "root folder" of the VFS? How does Nautilus 
> deal with the items in "computer:"?

The point of it is to display the Computer location to the user.
Nautilus mainly displays it and allows the user to mount/unmount
location. The exact set of drives/volumes displayed in this location is
what we currently think will give the best user experience, i.e. we
recently removed drives that support automounting from it.

It is in no way the "root folder" of the VFS. Its a part of the gnome
desktop user interface.

> The problem is, that i should map the list of volumes into a generic 
> "folder"  (It doesn't have to be "computer:"), because the Gnome-VFS 
> volume manager API is just too specific. I think the "data-model" 
> provided by libxdg-vfs should be as simple and flexible as possible, 
> which means a "volume" might turn up anywhere in the directory structure 
> of the VFS.

If you use the real APIs to list volumes and drives
(GnomeVFSVolumeManager) just like the computer:/// backend does you can
handle this however you want. I'm sure this will all be hacky and stuff
so you can support both KIO and gnome-vfs, but then I don't particularly
think that bridging KIO and vfs by adding a third API is a good idea.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an oversexed guitar-strumming cowboy on a search for his missing sister. 
She's an orphaned paranoid opera singer with a birthmark shaped like Liberty's 
torch. They fight crime! 




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