GNOME Bugzilla – Bug 668295
Need a way to classify GVolume instances
Last modified: 2012-03-01 19:12:22 UTC
If an application (such as Nautilus) wants to show a sidebar with devices group into different groups such as "Devices" and "Network", it's currently up to the application itself to do the classification (for example by looking at the URI scheme for the activation root, e.g. smb://). This is sub-optimal especially since we now generate GVolume instances for fstab entries such as server.tld:/somewhere/remote /home/davidz/Movies nfs4 default,users,noauto 0 0 will show up in the "Devices" part of Nautilus, see http://people.freedesktop.org/~david/gvfs-nautilus-missing-classification.png One way to fix this is to introduce G_VOLUME_IDENTIFIER_KIND_CLASS with the following known values device network and have the relevant volume monitors and backends set this as needed. We can later add other classes (bluetooth? maybe that's just 'device'), if needed.
Bluetooth, and most other device types supported by gvfs would fall under those 2 categories I would think.
OK, fixed in GLib with this commit http://git.gnome.org/browse/glib/commit/?id=10fbfcf09010e423cfc79c54e8da50b62a0f4b8a and this commit http://git.gnome.org/browse/gvfs/commit/?id=31f24aa3bdfa7f53e74d4e24fcb79a3b7ed0d0ce makes the udisks2 volume monitor set it. Example: $ gvfs-mount -li [...] Drive(1): CD/DVD Drive Type: GProxyDrive (GProxyVolumeMonitorUDisks2) ids: unix-device: '/dev/sr0' themed icons: [drive-optical] [drive] is_media_removable=1 has_media=1 is_media_check_automatic=1 can_poll_for_media=0 can_eject=1 can_start=0 can_stop=0 start_stop_type=unknown sort_key=00coldplug/11removable/sr0 Volume(0): LSI HBA Drivers Type: GProxyVolume (GProxyVolumeMonitorUDisks2) ids: class: 'device' unix-device: '/dev/sr0' label: 'LSI HBA Drivers' themed icons: [media-optical-cd-rom] [media-optical-cd] [media-optical] [media] can_mount=1 can_eject=1 should_automount=0 sort_key=gvfs.time_detected_usec.1330628670248775 [...] Volume(3): files Type: GProxyVolume (GProxyVolumeMonitorUDisks2) ids: class: 'network' themed icons: [folder-remote] [folder] can_mount=1 can_eject=0 should_automount=0 sort_key=gvfs.time_detected_usec.1330628670249575