diff options
-rw-r--r-- | config.def.h | 1 | ||||
-rw-r--r-- | udev-block-notify.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h index e5b5cf0..aca1ba0 100644 --- a/config.def.h +++ b/config.def.h @@ -20,6 +20,7 @@ #define ICON_LOOP "media-playlist-repeat" #define ICON_MEDIA_FLASH "media-flash" #define ICON_MEDIA_FLOPPY "media-floppy" +#define ICON_MEDIA_OPTICAL_CD_AUDIO "media-optical-cd-audio" #define ICON_MEDIA_REMOVABLE "media-removable" #define ICON_MEDIA_ZIP "media-zip" #define ICON_MULTIMEDIA_PLAYER "multimedia-player" diff --git a/udev-block-notify.c b/udev-block-notify.c index 30bc597..5d0652c 100644 --- a/udev-block-notify.c +++ b/udev-block-notify.c @@ -209,7 +209,11 @@ int main (int argc, char ** argv) { /* decide about what icon to use */ value = udev_device_get_property_value(dev, "ID_BUS"); if (udev_device_get_property_value(dev, "ID_CDROM") != NULL) { /* optical drive */ - icon = ICON_DRIVE_OPTICAL; + if (udev_device_get_property_value(dev, "ID_CDROM_MEDIA_TRACK_COUNT_AUDIO") != NULL) { + icon = ICON_MEDIA_OPTICAL_CD_AUDIO; + } else { + icon = ICON_DRIVE_OPTICAL; + } } else if (udev_device_get_property_value(dev, "ID_DRIVE_FLOPPY") != NULL) { /* floppy drive */ icon = ICON_MEDIA_FLOPPY; } else if (udev_device_get_property_value(dev, "ID_DRIVE_THUMB") != NULL) { /* thumb drive, e.g. USB flash */ |