Index: thunar-vfs/thunar-vfs-volume.c =================================================================== --- thunar-vfs/thunar-vfs-volume.c (revision 24031) +++ thunar-vfs/thunar-vfs-volume.c (working copy) @@ -333,6 +333,7 @@ case THUNAR_VFS_VOLUME_KIND_FLOPPY: case THUNAR_VFS_VOLUME_KIND_USBSTICK: case THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER: + case THUNAR_VFS_VOLUME_KIND_AUDIO_CD: return TRUE; default: @@ -445,6 +446,10 @@ return "gnome-dev-ipod"; break; + case THUNAR_VFS_VOLUME_KIND_AUDIO_CD: + if (gtk_icon_theme_has_icon (icon_theme, "gnome-dev-cdrom-audio")) + return "gnome-dev-cdrom-audio"; + default: break; } Index: thunar-vfs/thunar-vfs-volume.h =================================================================== --- thunar-vfs/thunar-vfs-volume.h (revision 24031) +++ thunar-vfs/thunar-vfs-volume.h (working copy) @@ -53,6 +53,7 @@ * @THUNAR_VFS_VOLUME_KIND_HARDDISK : Hard disk drives. * @THUNAR_VFS_VOLUME_KIND_USBSTICK : USB sticks. * @THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER : Portable audio players (i.e. iPod). + * @THUNAR_VFS_VOLUME_KIND_AUDIO_CD : CD with audio. * * Describes the type of a VFS volume. **/ @@ -72,6 +73,7 @@ THUNAR_VFS_VOLUME_KIND_HARDDISK, THUNAR_VFS_VOLUME_KIND_USBSTICK, THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER, + THUNAR_VFS_VOLUME_KIND_AUDIO_CD, } ThunarVfsVolumeKind; /** Index: thunar-vfs/thunar-vfs-volume-hal.c =================================================================== --- thunar-vfs/thunar-vfs-volume-hal.c (revision 24031) +++ thunar-vfs/thunar-vfs-volume-hal.c (working copy) @@ -580,20 +580,6 @@ g_free (volume_hal->device_file); volume_hal->device_file = g_strdup (libhal_volume_get_device_file (hv)); - /* determine the new label */ - g_free (volume_hal->device_label); - volume_label = libhal_volume_get_label (hv); - if (G_LIKELY (volume_label != NULL && *volume_label != '\0')) - { - /* just use the label provided by HAL */ - volume_hal->device_label = g_strdup (volume_label); - } - else - { - /* use the basename of the device file as label */ - volume_hal->device_label = g_path_get_basename (volume_hal->device_file); - } - /* release the previous mount point (if any) */ if (G_LIKELY (volume_hal->mount_point != NULL)) { @@ -606,6 +592,15 @@ { case LIBHAL_DRIVE_TYPE_CDROM: /* check which kind of CD-ROM/DVD we have */ + if (libhal_volume_disc_has_audio (hv) + && !libhal_volume_disc_has_data (hv)) + { + /* if the disc has no data, just audio, treat it as an audio CD. + * if it has both data and audio, treat it as a data CD. */ + volume_hal->kind = THUNAR_VFS_VOLUME_KIND_AUDIO_CD; + break; + } + switch (libhal_volume_get_disc_type (hv)) { case LIBHAL_VOLUME_DISC_TYPE_CDROM: @@ -674,6 +669,31 @@ break; } + /* determine the new label */ + g_free (volume_hal->device_label); + if (THUNAR_VFS_VOLUME_KIND_AUDIO_CD == volume_hal->kind) + { + volume_hal->device_label = g_strdup (_("Audio CD")); + } + else if (libhal_volume_disc_is_blank (hv)) + { + volume_hal->device_label = g_strdup (_("Blank Media")); + } + else + { + volume_label = libhal_volume_get_label (hv); + if (G_LIKELY (volume_label != NULL && *volume_label != '\0')) + { + /* just use the label provided by HAL */ + volume_hal->device_label = g_strdup (volume_label); + } + else + { + /* use the basename of the device file as label */ + volume_hal->device_label = g_path_get_basename (volume_hal->device_file); + } + } + /* non-disc drives are always present, otherwise it must be a data disc to be usable */ if (!libhal_volume_is_disc (hv) || libhal_volume_disc_has_data (hv)) volume_hal->status |= THUNAR_VFS_VOLUME_STATUS_PRESENT; @@ -1049,8 +1069,14 @@ if (G_UNLIKELY (hv == NULL)) return; - /* we don't care for anything other than mountable filesystems */ - if (G_UNLIKELY (libhal_volume_get_fsusage (hv) != LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM)) + /* we care about these things: + * 1. volumes with file systems + * 2. discs with audio + * 3. discs that are blank */ + if (G_UNLIKELY (libhal_volume_get_fsusage (hv) != LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM + && (!libhal_volume_is_disc (hv) || + (!libhal_volume_disc_has_audio (hv) + && !libhal_volume_disc_is_blank (hv))))) { libhal_volume_free (hv); return;