summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-01-29 02:15:12 +0100
committerSlávek Banko <[email protected]>2016-01-29 02:15:22 +0100
commite0f0d0936ffd3d57571453a0c3fce72a90be1dce (patch)
tree8c9aee60ac54607ace8320cd668e1112fa1d6d26 /tdeioslave/media/mediamanager/tdehardwarebackend.cpp
parent8aae507c2df306f588a057d52fbb0a723377d66d (diff)
downloadtdebase-e0f0d0936ffd3d57571453a0c3fce72a90be1dce.tar.gz
tdebase-e0f0d0936ffd3d57571453a0c3fce72a90be1dce.zip
Fix hard disks media icons in tdehw storage backend
This relates to Bug 2473 Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 90bad2e8140e362df33ea371ab28f128359e90cb)
Diffstat (limited to 'tdeioslave/media/mediamanager/tdehardwarebackend.cpp')
-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 ed7b63c0f..a7c01d868 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -735,36 +735,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()) {