summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--kcontrol/hwmanager/hwmanager.desktop1
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp13
2 files changed, 12 insertions, 2 deletions
diff --git a/kcontrol/hwmanager/hwmanager.desktop b/kcontrol/hwmanager/hwmanager.desktop
index 30c9956a0..d7348482c 100644
--- a/kcontrol/hwmanager/hwmanager.desktop
+++ b/kcontrol/hwmanager/hwmanager.desktop
@@ -6,7 +6,6 @@ DocPath=kcontrol/hwmanager/index.html
X-TDE-Library=hwmanager
X-TDE-ParentApp=kcontrol
-X-TDE-RootOnly=true
X-TDE-SubstituteUID=true
Categories=Qt;TDE;X-TDE-settings-hardware;
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)) {