summaryrefslogtreecommitdiffstats
path: root/tdeioslave
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-01-29 02:15:12 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-01-29 02:15:12 +0100
commit90bad2e8140e362df33ea371ab28f128359e90cb (patch)
tree8593938bbbecdd36e4f18998f6c7bb123ee3266f /tdeioslave
parentce73b505b2fb7ca3877cebdcd4785ac9ecbf0148 (diff)
downloadtdebase-90bad2e8140e362df33ea371ab28f128359e90cb.tar.gz
tdebase-90bad2e8140e362df33ea371ab28f128359e90cb.zip
Fix hard disks media icons in tdehw storage backend
This relates to Bug 2473 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdeioslave')
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp51
1 files changed, 24 insertions, 27 deletions
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index 8329c6e3f..8db7587c9 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -744,36 +744,33 @@ void TDEBackend::setVolumeProperties(Medium* medium)
if (useDefaultLabel) {
diskLabel = i18n("%1 Removable Device").arg(sdevice->deviceFriendlySize());
}
+ }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::CompactFlash)) {
- medium->setIconName("compact_flash" + MOUNT_ICON_SUFFIX);
- }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::MemoryStick)) {
- medium->setIconName("memory_stick" + MOUNT_ICON_SUFFIX);
- }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::SmartMedia)) {
- medium->setIconName("smart_media" + MOUNT_ICON_SUFFIX);
- }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::SDMMC)) {
- medium->setIconName("sd_mmc" + MOUNT_ICON_SUFFIX);
- }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::MediaDevice)) {
- medium->setIconName("ipod" + MOUNT_ICON_SUFFIX);
-
- if (sdevice->vendorModel().upper().contains("IPOD") && KProtocolInfo::isKnownProtocol( TQString("ipod") ) )
- {
- medium->unmountableState( "ipod:/" );
- medium->mountableState(!sdevice->mountPath().isNull());
- }
- }
- if (sdevice->isDiskOfType(TDEDiskDeviceType::Tape)) {
- medium->setIconName("magnetic_tape" + MOUNT_ICON_SUFFIX);
- }
- if (medium->isMounted() && TQFile::exists(medium->mountPoint() + "/dcim"))
- {
- mimeType = "media/camera" + MOUNT_SUFFIX;
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::CompactFlash)) {
+ medium->setIconName("compact_flash" + MOUNT_ICON_SUFFIX);
+ }
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::MemoryStick)) {
+ medium->setIconName("memory_stick" + MOUNT_ICON_SUFFIX);
+ }
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::SmartMedia)) {
+ medium->setIconName("smart_media" + MOUNT_ICON_SUFFIX);
+ }
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::SDMMC)) {
+ medium->setIconName("sd_mmc" + MOUNT_ICON_SUFFIX);
+ }
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::MediaDevice)) {
+ medium->setIconName("ipod" + MOUNT_ICON_SUFFIX);
+ if (sdevice->vendorModel().upper().contains("IPOD") && KProtocolInfo::isKnownProtocol( TQString("ipod") ) ) {
+ medium->unmountableState( "ipod:/" );
+ medium->mountableState(!sdevice->mountPath().isNull());
}
}
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::Tape)) {
+ medium->setIconName("magnetic_tape" + MOUNT_ICON_SUFFIX);
+ }
+ if (medium->isMounted() && TQFile::exists(medium->mountPoint() + "/dcim")) {
+ mimeType = "media/camera" + MOUNT_SUFFIX;
+ }
}
if (!medium->needMounting()) {