Allow GIO to handle CD devices if libcdio isn't installed

This commit is contained in:
Arnaud Bienner 2011-08-18 21:41:14 +02:00
parent 91537777c8
commit 299f15b7ee
1 changed files with 4 additions and 0 deletions

View File

@ -213,9 +213,11 @@ void GioLister::VolumeAdded(GVolume* volume) {
DeviceInfo info; DeviceInfo info;
info.ReadVolumeInfo(volume); info.ReadVolumeInfo(volume);
#ifndef HAVE_AUDIOCD
if (info.volume_root_uri.startsWith("cdda")) if (info.volume_root_uri.startsWith("cdda"))
// Audio CD devices are already handled by CDDA lister // Audio CD devices are already handled by CDDA lister
return; return;
#endif
info.ReadDriveInfo(g_volume_get_drive(volume)); info.ReadDriveInfo(g_volume_get_drive(volume));
info.ReadMountInfo(g_volume_get_mount(volume)); info.ReadMountInfo(g_volume_get_mount(volume));
if (!info.is_suitable()) if (!info.is_suitable())
@ -248,9 +250,11 @@ void GioLister::MountAdded(GMount* mount) {
DeviceInfo info; DeviceInfo info;
info.ReadVolumeInfo(g_mount_get_volume(mount)); info.ReadVolumeInfo(g_mount_get_volume(mount));
#ifndef HAVE_AUDIOCD
if (info.volume_root_uri.startsWith("cdda")) if (info.volume_root_uri.startsWith("cdda"))
// Audio CD devices are already handled by CDDA lister // Audio CD devices are already handled by CDDA lister
return; return;
#endif
info.ReadMountInfo(mount); info.ReadMountInfo(mount);
info.ReadDriveInfo(g_mount_get_drive(mount)); info.ReadDriveInfo(g_mount_get_drive(mount));
if (!info.is_suitable()) if (!info.is_suitable())