Re: Gnome-VFS, computer: and mounting
- From: nf2 <nf2 scheinwelt at>
- To: Alexander Larsson <alexl redhat com>
- Cc: gnome vfs list <gnome-vfs-list gnome org>
- Subject: Re: Gnome-VFS, computer: and mounting
- Date: Mon, 03 Jul 2006 12:21:03 +0200
Alexander Larsson wrote:
On Mon, 2006-07-03 at 01:01 +0200, nf2 wrote:
On Gnome-VFS i can walk through the desktop-entries listed by
computer://, (there is an option in my xdg_vfs_gnome backend to
automatically dive into desktop entries). It already works for mounted
drives, but for drives which are not mounted, the URL points to "(null)":
That will only happen for drives where the target mountpoint is not yet
known. (This happens with hal, although we should probably fix the
desktop file in this case...)
I think it's ok if the URL field of the desktop-entry is empty to
indicate that i have to 'mount' this FSDevice first...
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 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.
For instance KIO provides a hierarchical root-folder structure
system:/
system:/media
system:/remote
...
The volumes are not listed in system:, but in system:/media and there is
nothing like the volume manager API.
I could have a special XDGVFS_FILE_TYPE_MOUNTPOINT file-type and
"mounted", "mount_id" fields in XdgVfsFileInfo. If the client
application finds such a dir-entry with mounted=false it knows that it
has to call
xdg_vfs_sess_cmd_mount(char * mount_id) *)
before diving into the directory...
*) which could call:
gnome_vfs_volume_monitor_get_volume_by_id()
gnome_vfs_volume_get_drive()
gnome_vfs_drive_mount()
internally...
regards
Norbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]