summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-02-03 18:58:02 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-02-03 18:58:02 +0100
commit99f5115dac933f1b32e1156425eafd371b50169b (patch)
tree24463691426f218699b919a0d67a69e66860994e /tdeioslave/media/mediamanager/tdehardwarebackend.cpp
parent8d53affe8e249450df8263a0e9a32b4bf9dc4134 (diff)
downloadtdebase-99f5115dac933f1b32e1156425eafd371b50169b.tar.gz
tdebase-99f5115dac933f1b32e1156425eafd371b50169b.zip
Fix device icons in the media:/ tdeioslave to comply with XDG standards
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdeioslave/media/mediamanager/tdehardwarebackend.cpp')
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index bd3a61af9..5510478c7 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -45,6 +45,10 @@
(medium->isMounted() ? TQString("_mount") : TQString("_unmount")) + \
(medium->isEncrypted() ? (sdevice->isDiskOfType(TDEDiskDeviceType::UnlockedCrypt) ? "_decrypt" : "_encrypt") : "" ) \
)
+#define MOUNTED_ICON_SUFFIX ( \
+ (medium->isMounted() ? TQString("-mounted") : TQString("")) + \
+ (medium->isEncrypted() ? (sdevice->isDiskOfType(TDEDiskDeviceType::UnlockedCrypt) ? "-decrypted" : "-encrypted") : "" ) \
+ )
#define CHECK_FOR_AND_EXECUTE_AUTOMOUNT(udi, medium, allowNotification) { \
TQMap<TQString,TQString> options = MediaManagerUtils::splitOptions(mountoptions(udi)); \
@@ -748,16 +752,16 @@ void TDEBackend::setVolumeProperties(Medium* medium)
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::CompactFlash)) {
- medium->setIconName("compact_flash" + MOUNT_ICON_SUFFIX);
+ medium->setIconName("media-flash-compact_flash" + MOUNTED_ICON_SUFFIX);
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::MemoryStick)) {
- medium->setIconName("memory_stick" + MOUNT_ICON_SUFFIX);
+ medium->setIconName("media-flash-memory_stick" + MOUNTED_ICON_SUFFIX);
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::SmartMedia)) {
- medium->setIconName("smart_media" + MOUNT_ICON_SUFFIX);
+ medium->setIconName("media-flash-smart_media" + MOUNTED_ICON_SUFFIX);
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::SDMMC)) {
- medium->setIconName("sd_mmc" + MOUNT_ICON_SUFFIX);
+ medium->setIconName("media-flash-sd_mmc" + MOUNTED_ICON_SUFFIX);
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::MediaDevice)) {
medium->setIconName("ipod" + MOUNT_ICON_SUFFIX);
@@ -767,7 +771,7 @@ void TDEBackend::setVolumeProperties(Medium* medium)
}
}
if (sdevice->isDiskOfType(TDEDiskDeviceType::Tape)) {
- medium->setIconName("magnetic_tape" + MOUNT_ICON_SUFFIX);
+ medium->setIconName("media-tape" + MOUNTED_ICON_SUFFIX);
}
if (medium->isMounted() && TQFile::exists(medium->mountPoint() + "/dcim")) {
mimeType = "media/camera" + MOUNT_SUFFIX;