summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnant Kamath <kamathanant@gmail.com>2012-07-10 13:22:15 (GMT)
committerAnant Kamath <kamathanant@gmail.com>2012-07-10 13:22:15 (GMT)
commitdc26c7218ff6310e064726b6c9bd0b951fed6165 (patch)
tree13afa857e0f6bdac1a36d6a658a0a8c7282622a9
parenta2ce42be343902d5dd6f25aa64ceff10eb14bd45 (diff)
Optical-media icon for mounted ISOs
-rw-r--r--solid/solid/backends/udisks/udisksdevice.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/solid/solid/backends/udisks/udisksdevice.cpp b/solid/solid/backends/udisks/udisksdevice.cpp
index 638531e..2e38c9f 100644
--- a/solid/solid/backends/udisks/udisksdevice.cpp
+++ b/solid/solid/backends/udisks/udisksdevice.cpp
@@ -563,6 +563,15 @@ QString UDisksDevice::icon() const
return iconName;
}
+ // handle mounted ISOs
+ bool isLoop = prop( "DeviceIsLinuxLoop" ).toBool();
+ QString fstype = prop("IdType").toString();
+
+ if( isLoop && ( fstype == "iso9660" || fstype == "udf" ) )
+ {
+ return "media-optical";
+ }
+
// handle media
const QString media = prop( "DriveMedia" ).toString();
bool isOptical = prop( "DeviceIsOpticalDisc" ).toBool();