summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2010-03-18 14:42:24 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2010-03-18 14:42:24 +0100
commitddc7889419e2afe6dd86097a2afd1005ed38d93e (patch)
treed1abd3187452517ce0ceed9356980ade22c5635b
parent0c835c077f73a81cdbf7548699b5345f9768cfdd (diff)
Allow other rules to set a more specific presentation icon
If previous rules already set UDISKS_PRESENTATION_ICON_NAME (like in a future media-player-info, to attach more specific icons to particular devices), do not overwrite it with our generic icons; just set them if we do not have an icon at all yet. Also put the icon rules into their own visual section now, they were previously in the middle of the "card reader type" rules.
-rw-r--r--data/80-udisks.rules25
1 files changed, 15 insertions, 10 deletions
diff --git a/data/80-udisks.rules b/data/80-udisks.rules
index 0e8def4..06afe3a 100644
--- a/data/80-udisks.rules
+++ b/data/80-udisks.rules
@@ -131,7 +131,6 @@ KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="di
# ATA disks connected via SAS (not driven by libata)
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="ATA", IMPORT{program}="udisks-probe-ata-smart $tempnode"
-##############################################################################################################
# Example rule for tagging a device with a specific media type. Where and
# how to store this database needs some thought.
@@ -146,15 +145,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INS
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INSTANCE}=="0:2", ENV{ID_DRIVE_FLASH_SD}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INSTANCE}=="0:3", ENV{ID_DRIVE_FLASH_MS}="1"
-# Generic music player
-#
-SUBSYSTEMS=="usb", ENV{ID_MEDIA_PLAYER}=="?*", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player"
-SUBSYSTEMS=="usb", ENV{ID_MEDIA_PLAYER}=="apple-ipod", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player-ipod"
-
-# Apple iPod Video
-#
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1209", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player-ipod-white"
-
# APPLE SD Card Reader (MacbookPro5,4)
#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="8403", ENV{ID_DRIVE_FLASH_SD}="1"
@@ -168,6 +158,21 @@ SUBSYSTEMS=="usb", ENV{ID_MODEL}=="*MS_Reader*", ENV{ID_DRIVE_FLASH_MS}="1"
##############################################################################################################
+# If previous rules did not set an icon, provide a default one for media players
+
+ENV{UDISKS_PRESENTATION_ICON_NAME}=="?*", GOTO="udisks_media_player_end"
+
+ENV{ID_MEDIA_PLAYER}=="?*", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player"
+ENV{ID_MEDIA_PLAYER}=="apple-ipod", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player-ipod"
+
+# Apple iPod Video
+#
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1209", ENV{UDISKS_PRESENTATION_ICON_NAME}="multimedia-player-ipod-white"
+
+LABEL="udisks_media_player_end"
+
+##############################################################################################################
+
# PC floppy drives
#
KERNEL=="fd*", ENV{ID_DRIVE_FLOPPY}="1"