summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-06-23 12:55:26 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-07-08 18:51:44 +0900
commit11935291c7481dc34cbb8c1e49b2368f6a555b6b (patch)
treee22b26c5ae3efc087d3ab6972307fa379d39b857 /tdecore/tdehw
parent887996538a8712a2fa4ead0fc4a608e75421f57b (diff)
downloadtdelibs-11935291c7481dc34cbb8c1e49b2368f6a555b6b.tar.gz
tdelibs-11935291c7481dc34cbb8c1e49b2368f6a555b6b.zip
Normalized names of devices to avoid unintentional mixed used of icons from different
icon themes. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp2
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp11
2 files changed, 8 insertions, 5 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 149ecab5f..e8b287080 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -4326,7 +4326,7 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
ret = DesktopIcon("kcmpci", size); // FIXME
}
else if (query == TDEGenericDeviceType::Disk) {
- ret = DesktopIcon("drive-harddisk", size);
+ ret = DesktopIcon("drive-harddisk-unmounted", size);
}
else if (query == TDEGenericDeviceType::SCSI) {
ret = DesktopIcon("kcmscsi", size);
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index 16e6d6e4d..d797ff032 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -555,6 +555,9 @@ TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
if (mountPath() != TQString::null) {
mountString = "-mounted";
}
+ else {
+ mountString = "-unmounted";
+ }
TQPixmap ret = DesktopIcon("drive-harddisk" + mountString, size);
@@ -568,7 +571,7 @@ TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
ret = DesktopIcon("media-optical-cdrom" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::CDRW)) {
- ret = DesktopIcon("media-optical-cdwriter" + mountString, size);
+ ret = DesktopIcon("cd-rw" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::DVDROM)) {
ret = DesktopIcon("media-optical-dvd" + mountString, size);
@@ -586,7 +589,7 @@ TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
ret = DesktopIcon("media-tape" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::Camera)) {
- ret = DesktopIcon("camera" + TQString((mountPath() != TQString::null) ? "_mount" : "_umount"), size);
+ ret = DesktopIcon("camera" + mountString, size);
}
if (isDiskOfType(TDEDiskDeviceType::HDD)) {
@@ -609,10 +612,10 @@ TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
}
if (isDiskOfType(TDEDiskDeviceType::RAM)) {
- ret = DesktopIcon("memory" + mountString, size);
+ ret = DesktopIcon("memory", size); // FIXME there is only a single icon available for this device
}
if (isDiskOfType(TDEDiskDeviceType::Loop)) {
- ret = DesktopIcon("blockdevice" + mountString, size);
+ ret = DesktopIcon("blockdevice", size); // FIXME there is only a single icon available for this device
}
return ret;