summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 13:17:30 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 13:17:30 -0500
commitfeaced1b3cdb36d0b841207b92b40cab58d5437b (patch)
tree268835a4cfdff64f7689c38db5bfb70770f5255d /tdecore
parentdb2b839b72fd60399e502e9f048e5ec7b0dd8e92 (diff)
downloadtdelibs-feaced1b3cdb36d0b841207b92b40cab58d5437b.tar.gz
tdelibs-feaced1b3cdb36d0b841207b92b40cab58d5437b.zip
Add mount indicator to tdehwlib storage device icons
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index 1f01f59b2..e095b9ba1 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -858,63 +858,68 @@ TQString TDEStorageDevice::friendlyDeviceType() {
}
TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
- TQPixmap ret = DesktopIcon("drive-harddisk", size);
+ TQString mountString;
+ if (mountPath() != TQString::null) {
+ mountString = "-mounted";
+ }
+
+ TQPixmap ret = DesktopIcon("drive-harddisk" + mountString, size);
if (isDiskOfType(TDEDiskDeviceType::Floppy)) {
- ret = DesktopIcon("media-floppy-3_5", size);
+ ret = DesktopIcon("media-floppy-3_5" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Optical)) {
- ret = DesktopIcon("media-optical-cdrom", size);
+ ret = DesktopIcon("media-optical-cdrom" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::CDROM)) {
- ret = DesktopIcon("media-optical-cdrom", size);
+ ret = DesktopIcon("media-optical-cdrom" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::CDRW)) {
- ret = DesktopIcon("media-optical-cdwriter", size);
+ ret = DesktopIcon("media-optical-cdwriter" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::DVDROM)) {
- ret = DesktopIcon("media-optical-dvd", size);
+ ret = DesktopIcon("media-optical-dvd" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::DVDRW)) {
- ret = DesktopIcon("media-optical-dvd", size);
+ ret = DesktopIcon("media-optical-dvd" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::DVDRAM)) {
- ret = DesktopIcon("media-optical-dvd", size);
+ ret = DesktopIcon("media-optical-dvd" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Zip)) {
- ret = DesktopIcon("media-floppy-zip", size);
+ ret = DesktopIcon("media-floppy-zip" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Tape)) {
- ret = DesktopIcon("media-tape", size);
+ ret = DesktopIcon("media-tape" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Camera)) {
- ret = DesktopIcon("camera_unmount", size);
+ ret = DesktopIcon("camera_unmount" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::HDD)) {
- ret = DesktopIcon("drive-harddisk", size);
+ ret = DesktopIcon("drive-harddisk" + mountString, size);
if (checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)) {
- ret = DesktopIcon("media-flash-usb", size);
+ ret = DesktopIcon("media-flash-usb" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::CompactFlash)) {
- ret = DesktopIcon("media-flash-compact_flash", size);
+ ret = DesktopIcon("media-flash-compact_flash" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::MemoryStick)) {
- ret = DesktopIcon("media-flash-memory_stick", size);
+ ret = DesktopIcon("media-flash-memory_stick" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::SmartMedia)) {
- ret = DesktopIcon("media-flash-smart_media", size);
+ ret = DesktopIcon("media-flash-smart_media" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::SDMMC)) {
- ret = DesktopIcon("media-flash-sd_mmc", size);
+ ret = DesktopIcon("media-flash-sd_mmc" + mountString, size);
}
}
if (isDiskOfType(TDEDiskDeviceType::RAM)) {
- ret = DesktopIcon("memory", size);
+ ret = DesktopIcon("memory" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Loop)) {
- ret = DesktopIcon("blockdevice", size);
+ ret = DesktopIcon("blockdevice" + mountString, size);
}
return ret;