summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-17 21:13:02 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-17 21:13:02 +0000
commit2d6096ff94f0c2b72d0badda18bd51ac2347783b (patch)
tree6306d873f54f8548e58dc6ed90b04e5480b83d37 /tdeioslave/media
parent85affcb0ad342b91d95db6a3a69aaaaa75aea16f (diff)
downloadtdebase-2d6096ff94f0c2b72d0badda18bd51ac2347783b.tar.gz
tdebase-2d6096ff94f0c2b72d0badda18bd51ac2347783b.zip
Fix non-removable hard disk labels in the media tdeioslave
Fix TDE hardware manager needing root privileges
Diffstat (limited to 'tdeioslave/media')
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index 3029cec72..deaaf08e7 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -441,7 +441,8 @@ void TDEBackend::setVolumeProperties(Medium* medium)
medium->mountableState(sdevice->deviceNode(), sdevice->mountPath(), sdevice->fileSystemName(), !sdevice->mountPath().isNull());
TQString diskLabel = sdevice->diskLabel();
- if (diskLabel.isNull()) {
+ bool useDefaultLabel = diskLabel.isNull();
+ if (useDefaultLabel) {
diskLabel = i18n("%1 Removable Device").arg(sdevice->deviceFriendlySize());
}
@@ -478,6 +479,9 @@ void TDEBackend::setVolumeProperties(Medium* medium)
// Default
mimeType = "media/cdrom" + MOUNT_SUFFIX;
+ if (useDefaultLabel) {
+ diskLabel = i18n("%1 Removable Device").arg(sdevice->deviceFriendlySize());
+ }
if (sdevice->isDiskOfType(TDEDiskDeviceType::CDROM)) {
mimeType = "media/cdrom" + MOUNT_SUFFIX;
@@ -700,9 +704,16 @@ void TDEBackend::setVolumeProperties(Medium* medium)
// Default
mimeType = "media/hdd" + MOUNT_SUFFIX;
+ if (useDefaultLabel) {
+ diskLabel = i18n("%1 Fixed Disk (%2)").arg(sdevice->deviceFriendlySize(), sdevice->deviceNode());
+ }
if (sdevice->isDiskOfType(TDEDiskDeviceType::USB)) {
mimeType = "media/removable" + MOUNT_SUFFIX;
+ if (useDefaultLabel) {
+ diskLabel = i18n("%1 Removable Device").arg(sdevice->deviceFriendlySize());
+ }
+
medium->needMounting();
if (sdevice->isDiskOfType(TDEDiskDeviceType::CompactFlash)) {