summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-12-28 11:18:11 +0900
committerMichele Calgaro <[email protected]>2023-12-28 12:08:35 +0900
commit55af17246cb69b20ebb560ce32b033b1b4823c04 (patch)
tree3836bcba20e144bd7eb7842beca02add60482308
parentc4a6487c827add9382001ff1892b8fb3bfa94682 (diff)
downloadtdebase-55af17246cb69b20ebb560ce32b033b1b4823c04.tar.gz
tdebase-55af17246cb69b20ebb560ce32b033b1b4823c04.zip
Remove usage of TDEDiskDeviceStatus::Hotpluggable
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--kcontrol/hwmanager/devicepropsdlg.cpp6
-rw-r--r--kcontrol/hwmanager/hwdevicetray.cpp9
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp7
3 files changed, 7 insertions, 15 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp
index 89a7e867f..8145017a4 100644
--- a/kcontrol/hwmanager/devicepropsdlg.cpp
+++ b/kcontrol/hwmanager/devicepropsdlg.cpp
@@ -493,9 +493,6 @@ void DevicePropertiesDialog::populateDeviceInformation()
if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::ContainsFilesystem)) {
status_text += i18n("Contains a filesystem") + "<br>";
}
- if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)) {
- status_text += i18n("Hotpluggable") + "<br>";
- }
if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hidden)) {
status_text += i18n("Hidden") + "<br>";
}
@@ -537,8 +534,7 @@ void DevicePropertiesDialog::populateDeviceInformation()
showGroup = true;
}
if (isMonitoredDevice(sdevice) &&
- (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable) ||
- sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)))
+ sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable))
{
base->buttonDiskEject->setEnabled(true);
base->buttonDiskSafeRemove->setEnabled(true);
diff --git a/kcontrol/hwmanager/hwdevicetray.cpp b/kcontrol/hwmanager/hwdevicetray.cpp
index 4f4393e7e..7d5048c55 100644
--- a/kcontrol/hwmanager/hwdevicetray.cpp
+++ b/kcontrol/hwmanager/hwdevicetray.cpp
@@ -426,8 +426,7 @@ void HwDeviceSystemTray::contextMenuAboutToShow(TDEPopupMenu *menu)
(*rmbMenuEntries[SDActions::Open])[deviceLabel] = sdevice;
}
- if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable) ||
- sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable))
+ if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable))
{
(*rmbMenuEntries[SDActions::Eject])[deviceLabel] = sdevice;
@@ -487,8 +486,7 @@ void HwDeviceSystemTray::populateLMBMenu()
(sdevice->isDiskOfType(TDEDiskDeviceType::LUKS) ||
sdevice->isDiskOfType(TDEDiskDeviceType::OtherCrypted) ||
sdevice->checkDiskStatus(TDEDiskDeviceStatus::Mountable) ||
- sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable) ||
- sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)))
+ sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable)))
{
TQString deviceLabel = getDeviceLabel(sdevice);
TDEActionMenu *actionMenu = new TDEActionMenu(deviceLabel,
@@ -523,8 +521,7 @@ void HwDeviceSystemTray::populateLMBMenu()
}
- if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable) ||
- sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable))
+ if (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable))
{
addDeviceToLMBMenu(sdevice, SDActions::Eject, actionMenu, actionMenuIdx);
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index b12aa6ea9..77cd8e7b3 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -771,9 +771,8 @@ void TDEBackend::setVolumeProperties(Medium* medium)
diskLabel = i18n("%1 Fixed Disk (%2)").arg(sdevice->deviceFriendlySize(), sdevice->deviceNode());
}
- if (sdevice->isDiskOfType(TDEDiskDeviceType::USB)
- || sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable)
- || sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)) {
+ if (sdevice->isDiskOfType(TDEDiskDeviceType::USB) ||
+ sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable)) {
mimeType = "media/removable" + MOUNT_MEDIA_SUFFIX;
if (useDefaultLabel) {
diskLabel = i18n("%1 Removable Disk (%2)").arg(sdevice->deviceFriendlySize(), sdevice->deviceNode());
@@ -1035,7 +1034,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name)
bool removable = false;
if (!drive_udi.isNull()) {
- removable = ((sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable)) || (sdevice->checkDiskStatus(TDEDiskDeviceStatus::Hotpluggable)));
+ removable = sdevice->checkDiskStatus(TDEDiskDeviceStatus::Removable);
}
TQString tmp;