diff options
author | Slávek Banko <[email protected]> | 2016-02-03 18:58:02 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-02-03 18:58:02 +0100 |
commit | 99f5115dac933f1b32e1156425eafd371b50169b (patch) | |
tree | 24463691426f218699b919a0d67a69e66860994e /tdeioslave/media/mediamanager/halbackend.cpp | |
parent | 8d53affe8e249450df8263a0e9a32b4bf9dc4134 (diff) | |
download | tdebase-99f5115dac933f1b32e1156425eafd371b50169b.tar.gz tdebase-99f5115dac933f1b32e1156425eafd371b50169b.zip |
Fix device icons in the media:/ tdeioslave to comply with XDG standards
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'tdeioslave/media/mediamanager/halbackend.cpp')
-rw-r--r-- | tdeioslave/media/mediamanager/halbackend.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tdeioslave/media/mediamanager/halbackend.cpp b/tdeioslave/media/mediamanager/halbackend.cpp index 05cdae425..7829ab29e 100644 --- a/tdeioslave/media/mediamanager/halbackend.cpp +++ b/tdeioslave/media/mediamanager/halbackend.cpp @@ -48,6 +48,10 @@ (medium->isMounted() ? TQString("_mount") : TQString("_unmount")) + \ (medium->isEncrypted() ? (halClearVolume ? "_decrypt" : "_encrypt") : "" ) \ ) +#define MOUNTED_ICON_SUFFIX ( \ + (medium->isMounted() ? TQString("-mounted") : TQString("")) + \ + (medium->isEncrypted() ? (halClearVolume ? "-decrypted" : "-encrypted") : "" ) \ + ) /* Static instance of this class, for static HAL callbacks */ static HALBackend* s_HALBackend; @@ -616,16 +620,16 @@ void HALBackend::setVolumeProperties(Medium* medium) medium->needMounting(); switch (libhal_drive_get_type(halDrive)) { case LIBHAL_DRIVE_TYPE_COMPACT_FLASH: - medium->setIconName("compact_flash" + MOUNT_ICON_SUFFIX); + medium->setIconName("media-flash-compact_flash" + MOUNTED_ICON_SUFFIX); break; case LIBHAL_DRIVE_TYPE_MEMORY_STICK: - medium->setIconName("memory_stick" + MOUNT_ICON_SUFFIX); + medium->setIconName("media-flash-memory_stick" + MOUNTED_ICON_SUFFIX); break; case LIBHAL_DRIVE_TYPE_SMART_MEDIA: - medium->setIconName("smart_media" + MOUNT_ICON_SUFFIX); + medium->setIconName("media-flash-smart_media" + MOUNTED_ICON_SUFFIX); break; case LIBHAL_DRIVE_TYPE_SD_MMC: - medium->setIconName("sd_mmc" + MOUNT_ICON_SUFFIX); + medium->setIconName("media-flash-sd_mmc" + MOUNTED_ICON_SUFFIX); break; case LIBHAL_DRIVE_TYPE_PORTABLE_AUDIO_PLAYER: { @@ -654,7 +658,7 @@ void HALBackend::setVolumeProperties(Medium* medium) break; } case LIBHAL_DRIVE_TYPE_TAPE: - medium->setIconName(TQString::null); //FIXME need icon + medium->setIconName("media-tape" + MOUNTED_ICON_SUFFIX); break; default: medium->setIconName(TQString::null); |