From e0f0d0936ffd3d57571453a0c3fce72a90be1dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 29 Jan 2016 02:15:12 +0100 Subject: Fix hard disks media icons in tdehw storage backend This relates to Bug 2473 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 90bad2e8140e362df33ea371ab28f128359e90cb) --- .../media/mediamanager/tdehardwarebackend.cpp | 51 ++++++++++------------ 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'tdeioslave/media') 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()) { -- cgit v1.2.1